ActiveSlide: IAdhocSlide;
The ActiveSlide property determines active slide of dashboard.
To determine slide visibility, use the IAdhocSlide.Visible property.
Executing the example requires a dashboard with the DASHBOARDAS identifier.
Add links to the Adhoc, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
mbo: IMetabaseObject;
dashboard, dashboardA: IAdhocReport;
slides, slidesA: IAdhocSlides;
slide, slideA: IAdhocSlide;
i: Integer;
Begin
// Get current repository
MB := MetabaseClass.Active;
// Get dashboard
mbo := MB.ItemById("DASHBOARDAS").Edit;
dashboard := mbo As IAdhocReport;
// Get slides
slides := dashboard.Slides;
slides.RemoveByKey(2);
// Add a slide
slides.InsertAfter(0, "Slide2");
// Make the first slide hidden
dashboardA := slides.Report;
slideA := dashboardA.ActiveSlide;
slidesA := slideA.Slides;
slidesA.Item(0).Visible := False;
// Save report
mbo.Save;
End Sub UserProc;
After executing the example the slide is added to the dashboard and the first active slide becomes hidden.
See also: