Skip to content

pImageExportOptions - cDRReport

Methods - Properties - Events

Obsolete

The property is obsolete per version 26. Setting PDF export options is now done via the properties

Type

drImageExportOptions structure

Default

None

Arguments

None

Description

This write-only property must be set before exporting to image format (ExportReport). The property should be assigned a value of the drImageExportOptions data type.

This property cannot be set until the report OCX object is initialized. The COM object is created as part of the OpenReport method if it hasn't been done beforehand.

You can call the function DefaultImageExportOptions to initialize the drImageExportOptions variable.

Obsolete per version 26

DataFlex Framework usage

  • Web
  • Windows
  • FlexTron

Sample

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

Object oExportReportButton is a Button
    Set Label to 'Export Report'

    Procedure OnClick
        drImageExportOptions myExportOptions

        Get OpenReport Of oReport To sReportId
        // set the export options
        Get DefaultImageExportOptions of oReport to myExportOptions
        Move C_drJPEG to myExportOptions.iImageType
        Move False to myExportOptions.bMultiPage
        Move 1 to myExportOptions.iPage
        Set pImageExportOptions of oReport to myExportOptions

        // exports the report to a file named ExportFile.jpg
        Send ExportReport of oReport C_drImage 'c:\tmp\ExportFile.jpg'
    End_Procedure
End_Object