Skip to content

ParameterInfo - 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.
iParameter The N-th parameter if the report's data-source is a stored procedure, SQL statement, or the N-th user-defined parameter.

Description

Returns the name, type, length, and precision of the N-th parameter. Parameters can be user-defined or retrieved from a stored procedure or SQL statement data-source.

The parameter numbering starts at 0.

Attempting to get parameter information for a parameter whose number is outside the available range (0 – number of parameters, which can be retrieved via ParameterCount) should be avoided.

This method cannot be used before the report OCX object is initialized. The COM object creation is done as part of the OpenReport method if not done beforehand.

DataFlex Framework Usage

  • Web
  • Windows
  • FlexTron

Sample

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

Object oParameterValue is a Form
End_Object

Object oGetInfoButton is a Button
    Set Label to 'Parameter Info'

    Procedure OnClick
        String sReportId
        tDRParameter ReportParamInfo

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Get ParameterInfo of oReport sReportId 0 to ReportParamInfo
            Set Label of oParameterValue to ReportParamInfo.Name
            Send CloseReport of oReport sReportId
        End
    End_Procedure
End_Object