Skip to content

Parameters - cDRReport

Methods - Properties - Events

Method Type

Function

Return Type

tDRParameter[]

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 an array of tDRParameter values. Parameters can be user-defined or retrieved from a stored procedure or SQL statement data source.

This method cannot be used before the report OCX object is initialized. The COM object creation is performed as part of the OpenReport method if it has not been done previously.

DataFlex Framework Usage

  • Web
  • Windows
  • FlexTron

Sample

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

Object oShowParametersInReportButton is a Button
    Set Label to 'Show Parameters in Report'

    Procedure OnClick
        String sReportId
        tDRParameter[] ParameterInfo
        Integer iParameters

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Get Parameters of oReport sReportId to ParameterInfo
            Move (SizeOfArray(ParameterInfo)) to iParameters
            Decrement iParameters
            For iParameter from 0 to iParameters
                Showln ParameterInfo[iParameter].sName
                Showln ParameterInfo[iParameter].iType
                Showln ParameterInfo[iParameter].iLength
                Showln ParameterInfo[iParameter].iPrecision
                Showln ParameterInfo[iParameter].sComments
            Loop
            Send CloseReport of oReport sReportId
        End
    End_Procedure
End_Object