Skip to content

OnInitializeReport - cDRReport

Methods - Properties - Events

Method Type

Procedure (event)

Arguments

-

Description

This event is triggered by the object during the OpenReport method.

Typical actions programmed within this event include setting properties such as peOutputDestination, as well as adding or removing filters and sort orders. If the data source is RDS, the array with data is provided to the print engine during this event.

Setting the property pbCanceled to true halts further loading of the report. The OpenReport method will set psReportId to an empty string and will return an empty string.

DataFlex Framework Usage

  • Web
  • Windows
  • FlexTron

Sample

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

    Procedure OnInitializeReport
        Integer iSubReports
        String sReportId

        Forward Send OnInitializeReport

        Get psReportId to sReportId
        Send RemoveAllFilters sReportId

        // Would stop the report loading when the report contains sub-reports
        Get SubReportCount sReportId to iSubReports
        Set pbCanceled to (iSubReports > 0)
    End_Procedure
End_Object

Notes

  • Only for augmentation