PtrDevice:PrintPreview() Method
<< Click to Display Table of Contents >> PtrDevice:PrintPreview() Method |
![]() ![]() ![]() |
Purpose
Initiate the printing process and display the results in the print preview dialog window.
Syntax
<oPtrDevice>:PrintPreview(cJobName, cPrint2File, cCaption, cMessage, [lModal], [lPreBody], [lPostBody], [nShowState], [lZoomed], [symPPWindow])
Arguments
cJobName |
The name used for the print job. This is the name that will be displayed in the Windows Print Manager. This parameter is only used if the user selects the print option from the preview window. |
cPrint2File |
The filename used when the Print To File option is selected. This parameter is only used if the user selects the print option from the preview window. |
cCaption |
The caption displayed on the Print Preview window. |
cMessage |
The message string displayed on the dialog window presented to the user during printing. This parameter is only used if the user selects the print option from the preview window. |
lModal |
Optional parameter which if TRUE creates the Print Preview as a modal dialog window; FALSE produces a modeless one. The default is TRUE. |
lPreBody |
Logical indicating if a pre-body page is to be printed. (You must provide a PrintPreBody() callback method to actually perform the printing). Default: FALSE |
lPostBody |
Logical indicating if a post-body page is to be printed. (You must provide a PrintPostBody() callback method to actually perform the printing). Default: FALSE |
nShowState |
Optional parameter to set the preview window show state. Valid options are: SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED |
nZoomed |
Optional parameter which specifies the initial zoom level of the Print Preview window. Valid options are:ZOOM_WHOLE_PAGE, ZOOM_PAGE_WIDTH and ZOOM_100 |
symPPWindow |
Optional parameter to specify a symbol representing a class to instantiate for use as the Print Preview window. The class specified must provide certain callback methods for ReportPro. The code for ReportPro's PrintPreview windows is provided as an example of what methods the window needs to provide. There are two Print Preview window types provided with ReportPro: #rpPrintPreviewMDI: this symbol will produce a Print Preview window that is built on an MDI child window. The owner must be an MDI shell type window. #rpPrintPreviewDLG: this symbol will produce a Print Preview window that is built on a modal or modeless dialog window. |
Description
For a complete description of the printing process, please see the discussion in the PtrDevice introduction.
Example
// Begin printing in a modeless preview window
oPtrDevice:PrintPreview("App Name", ;
"PRINT.PRN","Print","Printing...",False)