Skip to content

OutputReport - cDRReport

Methods - Properties - Events

Method Type

Procedure

Arguments

None

Description

Outputs the report where peOutputDestination

When ExportReport is used, the properties peExportType and psExportFileName need to have valid values; otherwise, an error will be generated.

When the output destination is PRINT_TO_PRINTER, you can set the phPrintDlg property. The contents of this property are then passed to the PrintReport method and should contain the address of a PrintDlgEx structure. Instead of specifying the address of a PrintDlgEx structure, you can specify the name of the printer via psPrinterName.

The output destination can also be set to PRINT_TO_PRINTER_NO_DIALOG, which causes the output to be sent to the default printer.

DataFlex Framework usage

  • Web
  • Windows
  • FlexTron

Sample

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

Object oRunReportButton is a Button
    Set Label to 'Run Report'

    Procedure OnClick
        String sReportId

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Send OutputReport Of oReport
            Send CloseReport Of oReport sReportId
        End
    End_Procedure
End_Object