DFPrint - cWinReport2
Invokes the printer job dialog and prints the document using current settings in the print setup
Type: Procedure
Syntax
Procedure DFPrint
Call Example
Send DFPrint
Description
DFPrint invokes the print job dialog, prints the current generated report, and then clears the report document This should be sent after a report is completed.
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.
The Print Job Dialog can be invoked directly using the DFPrintDialog message.
You can print a report without invoking the print job dialog be sending the DFPrintDoc message.
See Also
output_device_mode | DFPrintDoc | DFPrintDialog | DFClearDoc