Skip to content

FiltersDefined - cDRReport

Methods - Properties - Events

Method Type

Function

Return Type

Boolean

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.

Description

Returns whether the report of any of the (nested) sub-reports has one or more filters defined. The filters must have been defined by either the filter expert in the designer or added via AddFilter.

This method 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'
End_Object

Object oShowFiltersDefinedButton is a Button
    Set Label to 'Are there filters defined?'

    Procedure OnClick
        String sReportId sText
        Boolean bFiltersDefined

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Get FiltersDefined of oReport sReportId to bFiltersDefined
            If (bFiltersDefined) Begin
                Move 'The report contains filters.' to sText
            End
            Else Begin
                Move 'The report does not contain filters.' to sText
            End
            Send Info_Box sText
            Send CloseReport of oReport sReportId
        End
    End_Procedure
End_Object