Skip to content

pCSVExportOptions - cDRReport

Methods - Properties - Events

Obsolete

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

Type

drCSVExportOptions structure

Default

None

Arguments

None

Description

This write-only property must be set before exporting to CSV using the (ExportReport) method. The property should be assigned a value of the drCSVExportOptions 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 has not been done previously.

You can call the DefaultCSVExportOptions function to initialize the drCSVExportOptions 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
        drCSVExportOptions CSVExportOptions
        String sReportId

        Get OpenReport Of oReport To sReportId
        // set the export options
        Move '”' to CSVExportOptions.cFieldDelimiter
        Move ',' to CSVExportOptions.cFieldSeparator
        Move False to CSVExportOptions.bExportGroupSections
        Move False to CSVExportOptions.bExportPageSections
        Move False to CSVExportOptions.bExportReportSections
        Move True to CSVExportOptions.bAllPages
        Move 1 to CSVExportOptions.iPage
        Set pCSVExportOptions of oReport to CSVExportOptions

        // exports the report to a file named ExportFile.csv
        Send ExportReport of oReport C_drCSV 'ExportFile.csv'
    End_Procedure
End_Object