Skip to content

ParameterName - cDRReport

Methods - Properties - Events

Method Type

Function

Return Type

String

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 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.

An empty string will be returned if the name of the parameter is outside the available range (0 – number of parameters, which can be retrieved via ParameterCount).

This method cannot be used before the report OCX object is initialized. The COM object creation occurs 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 oParameterName is a TextBox
End_Object

Object oGetParameterNameButton is a Button
    Set Label to 'Get Parameter Name'

    Procedure OnClick
        String sReportId sName

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Get ParameterName of oReport sReportId 0 to sName
            Set Label of oParameterName to sName
            Send CloseReport of oReport sReportId
        End
    End_Procedure
End_Object