Enables a user to print cached pages in a report run with ListenerType 1 or 3 without closing the preview window.
|
---|
Object.PrintCachedPages() |
Remarks
Example
The following code example comes from the ActionPrint method of the frxpreviewform class in the ReportPreview project. This project contains the source code for the default _REPORTPREVIEW application, ReportPreview.app. You can find and modify the source code in the Tools\xsource subfolder of your Visual FoxPro 9.0 installation folder.
| Copy Code |
---|
if THIS.oReport.commandClauses.NOWAIT
THIS.oReport.PrintCachedPages()
else
* Terminate:
THIS.suppressRendering = .T.
THIS.printOnExit = .T.
THIS.Release()
endif |
Because the ReportPreview application that is included with Visual FoxPro uses PrintCachedPages( ), you can control the behavior of the Print button in the Print Preview toolbar. If you want the Print Preview window to stay open after a user clicks Print, include the NOWAIT clause in your REPORT FORM command, for example:
| Copy Code |
---|
REPORT FORM (filename) OBJECT oReportListener PREVIEW NOWAIT |
If you want the Print Preview window to close when a user clicks Print, do not include the NOWAIT clause in your REPORT FORM command. For example:
| Copy Code |
---|
REPORT FORM (filename) OBJECT oReportListener PREVIEW |
See Also