IPrxTableIsland.Pager

Fore Syntax

Pager: IPrxTableIslandPager;

Fore.NET Syntax

Pager: Prognoz.Platform.Interop.Report.IPrxTableIslandPager;

Description

The Pager property returns parameters of work of the relational area in the paging mode.

Comments

To enable the mode, use the IPrxTableIslandPager.Enabled property.

To switch between pages in the page-by-page method, use the IPrxTableIslandPager.Next and IPrxTableIslandPager.Prev methods.

Fore Example

To execute the example, add links to the Metabase and Report system assemblies. The example is an event handler for components of the form. Arrange the UiReport and ReportBox components and three buttons on the form. Select a regular report with relative area as the UiReport object. Set UiReport as a report output in ReportBox. Activate UiReport1.

Class TESTForm: Form
    Report: IPrxReport;
    TabIs: IPrxTableIslands;
    TI: IPrxTableIsland;
    Pager: IPrxTableIslandPager;
    
    Sub TESTFormOnCreate(Sender: Object; Args: IEventArgs);
    Begin
        Report := UiReport1.Report;
        TabIs := Report.TableIslands;
        TI := TabIs.Item(0);
        debug.WriteLine("Area: " + TI.Name);
        Pager := TI.Pager;
        Pager.Enabled := True;
        TI.Recalc;
        Pager.DisplayPage := 0;
        Pager.Rows := 10;
        debug.WriteLine("Number of displayed pages: " + Pager.Pages.ToString);
        TI.Recalc;
    End Sub TESTFormOnCreate;
    
    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Begin
        Pager.Prev;
    End Sub Button1OnClick;
    
    Sub Button2OnClick(Sender: Object; Args: IMouseEventArgs);
    Begin
        Pager.Next;
    End Sub Button2OnClick;
    
    Sub Button3OnClick(Sender: Object; Args: IMouseEventArgs);
    Begin
        Pager.ExpandAll;
    End Sub Button3OnClick;
End Class TESTForm;

After opening the form on the sheet the first displaying page is loaded, the number of pages is displayed in the console window. To switch between pages, use buttons with the Button1 and Button2 identifiers. To disable page-by-page displaying mode without recalculating relational area, use the button with the Button3 identifier.

Fore.NET Example

To execute the example, add links to the Metabase and Report system assemblies. The example is an event handler for components of the form. Arrange the UiReportnet and ReportBoxnet components and three buttons on the form. Select a regular report with relative area as the UiReportnet object. Set UiReportnet as a report output in ReportBox. Activate UiReportnet1.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;

Public Partial Class TESTForm: Prognoz.Platform.Forms.Net.ForeNetForm
    Public Constructor TESTForm();
    Begin
        InitializeComponent();
    End Constructor;

    Report: IPrxReport;
    TabIs: IPrxTableIslands;
    TI: IPrxTableIsland;
    Pager: IPrxTableIslandPager;
    
    Private Sub TESTForm_Load(sender: System.Object; e: System.EventArgs);
    Begin
        Report := UiReportnet1.ReportUi.Report;
        TabIs := Report.TableIslands;
        TI := TabIs.Item[0];
        Pager := TI.Pager;
        Pager.Enabled := True;
        TI.Recalc();
        Pager.DisplayPage := 0;
        Pager.Rows := 10;
        System.Diagnostics.Debug.WriteLine("Number of displaying pages: " + Pager.Pages.ToString());
        TI.Recalc();
    End Sub;

    Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    Begin
        Pager.Prev(1);
    End Sub;

    Private Sub button2_Click(sender: System.Object; e: System.EventArgs);
    Begin
        Pager.Next(1);
    End Sub;
    
    Private Sub button3_Click(sender: System.Object; e: System.EventArgs);
    Begin
        Pager.ExpandAll();
    End Sub;

End Class;

After opening the form on the sheet the first displaying page is loaded, the number of pages is displayed in the console window. To switch between pages, use buttons with the button1 and button2 identifiers. To disable page-by-page displaying mode without recalculating relational area, use the button with the button3 identifier.

See also:

IPrxTableIsland