piPreviewCurrentPage - cDRReport¶
Methods - Properties - Events
Type¶
Default¶
1
Arguments¶
None
Description¶
Sets/Gets the current preview page number of a report.
This property cannot be accessed before the report OCX object is initialized and a report is opened (OpenReport).
DataFlex Framework usage¶
- Windows
- FlexTron (using windows views)
Sample¶
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
End_Object
Object oRunReportButton is a Button
Set Label to 'Run Report'
Procedure OnClick
// Opens the report
Send RunReport of oReport
End_Procedure
End_Object
Object oPageNumberForm is a Form
Set Label to 'Page:'
End_Object
Object oShowCurrentPageButton Is a Button
Set Label to 'Show Current Page Number'
Procedure OnClick
Integer iPage
Get piPreviewCurrentPage of oReport to iPage
Set Value of oPageNumberForm to iPage
End_Procedure
End_Object
Object oRunReportFromSecondPageButton is a Button
Set Label to 'Run Report from page 2'
Procedure OnClick
// Start the preview from the second page, assuming there is a 2nd page
Set piPreviewCurrentPage of oReport to 2
End_Procedure
End_Object