Skip to content

phoExportOptionsDialog - cDRExportMenuItem

Type

Handle

Default

0

Description

Must be set to the object ID of an object that handles the export of the report data. There is a predefined dialog that can be used for this. The predefined dialog can be found in the DRExportOptions.dg package.

If the property is not set to an object ID, the OnExecute does not send the message ExportReport to start an export. Of course, you can overwrite the whole OnExecute with your own logic.

Sample

Use DRExportOptions.dg

Object oExport is a cDRExportMenuItem
    Set phoExportOptionsDialog to (oDRExportOptionsDialog)
End_Object

In the next example, the OnExecute is overridden and calls the ExportReport method directly.

Object oExport is a cDRExportMenuItem
    Procedure OnExecute Variant vCommandBarControl
        Handle hoReport
        drPDFExportOptions PDFExportOptions

        Get ReportObject to hoReport

        Move C_drNormal to PDFExportOptions.iPageMode
        Move 'MyPassword' to PDFExportOptions.sOwnerPassword
        Move 'UserPassword' to PDFExportOptions.sUserPassword
        Move C_drLow to PDFExportOptions.iImageQuality
        Move C_drPDFA to PDFExportOptions.iPDFType
        Set pPDFExportOptions of hoReport to PDFExportOptions

        Send ExportReport of hoReport C_drPDF 'c:\tmp\MyReport.PDF'
    End_Procedure
End_Object