Pager: IPrxTableIslandPager;
The Pager property returns parameters of work of the relational area in the paging mode.
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.
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.
See also: