This method and GetPageHeight allow a preview object or any other “participant” in the output process to interrogate the ReportListener object for the dimensions of page output, as determined by the printer settings in force for the report run. The ReportListener's PreviewContainer uses these methods when the ReportListener object calls its Show method, to determine how to display the current report's contents.
These methods provide usable values at all points in the reporting process after BeforeReport and before UnloadReport, unless you invoke continuation by using NOPAGEEJECT on your REPORT FORM command. If you use NOPAGEJECT, these methods continue to provide usable results until a REPORT FORM without NOPAGEEJECT arrives at its UnloadReport event. At other times, both methods return 0.
The time period during which GetPageHeight and GetPageWidth provide usable values is determined by when the ReportListener sets up the page layout and print job. The ReportListener does not re-evaluate page layout and page dimensions between REPORT FORM commands when you use NOPAGEJECT since these report runs are part of a single print job. However, you can create classes derived from ReportListener that can handle multiple page sizes during a continued report run.