Skip to content

ReportIdsForFunction - cDRReport

Methods - Properties - Events

Method Type

Function

Return Type

Array of tReportFunctionId values

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.
sFunctionName Name of the function to find.

Description

Enumerates the report and all of its sub-reports and returns an array of report IDs that contain the function whose name is passed.

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 "customer with subreport.dr"

    Procedure OnInitializeReport
        String sReportId
        tReportFunctionId[] FunctionLocations
        Integer iElements iElement

        Get psReportId to sReportId
        Get ReportIdsForFunction sReportId "customernumber" to FunctionLocations
        Move (SizeOfArray(FunctionLocations)) To iElements
        Decrement iElements

        For iElement From 0 to iElements
            Set psFunction FunctionLocations[iElement].sReportId "customernumber" to "return ('{customer.number}=100')"
        Loop
    End_Procedure
End_Object