Skip to content

phoPrintDialog - cDRReport

Methods - Properties - Events

Type

Handle

Default

Object handle of a child object from the cPrintDialog class.

Arguments

None

Description

This property contains the object handle of an automatically created child object which is based on the cPrintDialog class. This object can be used to control printed output.

DataFlex Framework usage

  • Web
  • Windows
  • FlexTron

Sample

Object oReport is a cDRReport
    Set psReportName to 'MyReport.dr'
    Set peOutputDestination to PRINT_TO_PRINTER
End_Object

Object oOutputReportButton is a Button
    Set Label to 'Output Report'

    Procedure OnClick
        Integer iFlags
        Handle hoPrintDialog

        Get phoPrintDialog of oReport to hoPrintDialog
        If (hoPrintDialog <> 0) Begin
            Get piFlags of hoPrintDialog to iFlags
            Move (iFlags iOr PD_COLLATE) To iFlags
            Set piFlags Of hoPrintDialog To iFlags
        End
        Send RunReport Of oReport
    End_Procedure
End_Object