OutputPageCount Property
Provides the number of pages that has been rendered and could be accessed using the OutputPage method.
ReportListener.OutputPageCount
Return Value
Integer data type.
The default value is 0. This property is readonly.
Remarks
Applies To: ReportListener Object.
OutputPageCount provides the number of pages that have been rendered during a report run. If you use the RANGE clause on the LABEL or REPORT FORM command, this number may be less than the full number of pages in the report scope.
The pages in OutputPageCount are the only pages you can request from the ReportListener using the OutputPage method.
Note
Exactly how or when you can ask for these pages using OutputPage is dependent on whether the engine is in page-at-a-time mode (print-oriented ListenerType values 0 and 2) or all-pages-at-once mode (preview-oriented ListenerType values 1 and 3). For more information, see OutputPage Method.
OutputPageCount is not reset between reports, so you can check its value between report runs. When you run a report, OutputPageCount is set to 0 before LoadReport, unless the previous report run used the NOPAGEEJECT keyword. It remains at a constant value, either 0 or the retained value of the last report's run if NOPAGEEJECT was used, throughout the calculation pass, if the report is going through multiple passes.
OutputPageCount does not change during LoadReport or BeforeReport. It is incremented at the end of every page included in output. Starting at the AfterReport event, OutputPageCount therefore contains all pages including output so far, for the current report plus any previous reports chained to this one using NOPAGEEJECT.
Note
The base class ReportListener determines whether a page is included in output by invoking the IncludePageInOutput Method internally. In a multiple-pass report, the ReportListener only makes this determination on the second pass.
For more information about how the native Report System components assign the OutputPageCount value and other values at the beginning and end of a report run, see Understanding Visual FoxPro Object-Assisted Reporting.
See Also
Reference
ReportListener Object Properties, Methods, and Events