IAdhocReport.ActiveSlide

Fore Syntax

ActiveSlide: IAdhocSlide;

Fore.NET Syntax

ActiveSlide: Prognoz.Platform.Interop.AdHoc.IAdhocSlide;

Description

The ActiveSlide property determines active slide of dashboard.

Comments

To determine slide visibility, use the IAdhocSlide.Visible property.

Fore Example

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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.AdHoc;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    mbo: IMetabaseObject;
    dashboard, dashboardA: IAdhocReport;
    slides, slidesA: IAdhocSlides;
    slide, slideA: IAdhocSlide;
    i: integer;
Begin
    // Get current repository
    MB := Params.Metabase;
    // 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;

See also:

IAdhocReport