DFPrintDialog - cWinReport2
Invokes the WinPrint2 Print Job Dialog
Type: Procedure
Syntax
Procedure DFPrintDialog
Call Example
Send DFPrintDialog
Description
DFPrintDialog invokes the the Print Job Dialog. The Print Job dialog allows you to set a report's page range, number of copies, and collation. It is usually invoked after a report has been generated before printing. It can be invoked manually by with the DFPrintDialog message. It is also invoked using the DFPrint message which will invoke the dialog, print the report and then clear the report document.
These two samples do the same thing.
Procedure PrintGeneratedReport
Integer bOk
Get DFPrintDialog To bOk
If bOk Begin
Send DFPrintDoc
Send DFClearDoc
End
End_Procedure
Procedure PrintGeneratedReport
Send DFPrint
End_Procedure
When using the report object, you will usually not need to write this kind of code. The report object's output_device_mode handles report output. If it is set to PRINT_TO_PRINTER, the print job dialog will be presented when the report is generated and ready to be printed. If the mode is PRINT_TO_PRINTER_NO_DIALOG, the Print Job Dialog is suppressed.
If the report is generated to the viewer (output_device mode is PRINT_TO_WINDOW or DEFERRED_PRINT_TO_WINDOW), the Print Job Dialog will be invoked when you select the viewer's print button.
See Also
output_device_mode | DFPrint | DFSetPrintDlgInPreview | DFSetPrintDlgInPreview | DFGetEnablePrintFromPreview | DFSetEnablePrintFromPreview