CopyReportPageSizeAndOrientation - cDRReport¶
Methods - Properties - Events
Method Type¶
Procedure
Arguments¶
| Argument | Description |
|---|---|
sReportID |
Contains the ID of the main report. |
hoPrintDialog |
Contains the object ID of a cPrintdialog object, also stored in the phoPrintDialog |
Description¶
The purpose of this somewhat private method is to retrieve the paper size and paper orientation of the report and use this to set pePaperSize and peOrientation of the printer dialog object. The reading and copy information can be controlled by the pbCopyReportPaperSizeAndOrientation property.
The method is called from PrintReport and PrintToDefaultPrinter.
When to skip the copy? Both pePaperSize and peOrientation are used for the DEVMODE structure. Setting this prior to opening the printer selection dialog resulted in a couple of printers not printing at all because the driver extra attributes were not provided. When the paper size and paper orientation are important for printing, one can change the settings after the PrintDialog function has finished.
DataFlex Framework usage¶
- Web
- Windows
- FlexTron
Sample¶
Object oReport is a cDRReport
Procedure CopyReportPageSizeAndOrientation String sReportId Handle hoPrintDialog
Set pbCopyReportPaperSizeAndOrientation to false
Forward Send CopyReportPageSizeAndOrientation
End_Procedure
End_Object