ReportPageCount - cDRReport¶
Methods - Properties - Events
Method Type¶
Function
Return Type¶
Arguments¶
None
Description¶
Returns the number of pages in the report.
This method cannot be used before the report OCX object is initialized. The COM object creation is performed as part of the OpenReport method if it has not been done beforehand.
DataFlex Framework Usage¶
- Web
- Windows
- FlexTron
Sample¶
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
End_Object
Object oTotalPagesForm is a Form
Set Label to "Total Pages:"
Set Enabled_State to False
Set Form_Datatype to 0
End_Object
Object oRunReportButton is a Button
Set Label to 'Run Report'
Procedure OnClick
String sReportId
Integer iPageCount
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
Get ReportPageCount of oReport to iPageCount
Set Value of oTotalPagesForm to iPageCount
End
End_Procedure
End_Object
Notes¶
- If at the time of the function execution the last page has not been determined, all pages will be formatted to get the result.