Skip to content

ParameterComment - 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 comments entered for 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 iParameter passed 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 is performed as part of the OpenReport method if it has not been done beforehand.

DataFlex Framework Usage

  • Web
  • Windows
  • FlexTron

Sample

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

Object oParameterComment is a cTextEdit
End_Object

Object oGetParameterCommentButton is a Button
    Set Label to 'Get Parameter Comment'

    Procedure OnClick
        String sReportId sComment

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Get ParameterComment of oReport sReportId 0 to sComment
            Send AppendTextLn of oParameterComment to sComment
            Send CloseReport of oReport
        End
    End_Procedure
End_Object