Skip to content

DefaultPDFExportOptions - cDRReport

Methods - Properties - Events

Obsolete

Default values for PDF export are no longer code inside the cDRReport class but retrieved from the OCX. While you can still use the function and the struct it the usage is obsolete.

Method Type

Function

Arguments

None

Returns

drPDFExportOptions

Description

This function can be used to return a default set of PDF export options.

After retrieving the default set of options, one or more members can be changed.

The default initializes the members to:

Member Value
iPageMode C_drNormal
iPDFType C_drPDFNormal
sOwnerPassword '' (empty string)
sUserPassword '' (empty string)
iImageQuality C_DRLow
bAllPages True
iPage 0
sFileName '' (empty string)

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
        String sReportId
        drPDFExportOptions PDFExportOptions

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Get DefaultPDFExportOptions of oReport to PDFExportOptions
            Set pPDFExportOptions of oReport to PDFExportOptions
            Send ExportReport of oReport C_drPDF 'MyReport.pdf'
            Send CloseReport of oReport sReportId
        End
    End_Procedure
End_Object