Skip to content

psFilterField - cDRReport

Methods - Properties - Events

Type

String

Default

None

Arguments

Argument Description
sReportID ID of the report. Can be ID of the main report or the ID of a sub-report. This argument can be passed as an empty string. The empty string can be written as C_USEMAINDRREPORTID.
iFilter The 0-based index of the filter.

Description

Sets/Gets the N-th filter field name of a report.

Filters can be added in the designer via the filter expert dialog or via the AddFilter method.

Trying to set psFilterField of a non-existing filter does not do anything and gives no error.

Use this property together with peFilterOperator and psFilterValue.

This property cannot be used before the report OCX object is initialized. The COM object creation is - when not done before - created as part of the OpenReport method.

DataFlex Framework usage

  • Web
  • Windows
  • FlexTron

Sample

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

    Procedure OnInitializeReport
        String sReportId

        Forward Send OnInitializeReport

        Get psReportId to sReportId
        // The following code assumes there is at least one filter defined
        Set psFilterField sReportId 0 to '{Titles.YearPublished}'
        Set peFilterOperator sReportId 0 to C_drEqual
        Set psFilterValue sReportId 0 to 1984
    End_Procedure
End_Object

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

    Procedure OnClick
        String sReportId sFilterField

        Send RunReport of oReport

        Get psReportId of oReport to sReportId
        // The following code assumes there is a filter defined
        Get psFilterField of oReport sReportId 0 to sFilterField
    End_Procedure
End_Object

Notes

  • The above code assumes there is at least one filter defined.