Skip to content

psParameterValue - cDRReport

Methods - Properties - Events

Type

String

Default

None

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 index of the parameter.

Description

Sets/Gets the value of the N-th parameter in a report based on a stored procedure or a report that uses parameters.

A report can have 0 to N parameters. The number of parameters can be retrieved by using the ParameterCount function. The type and name of each of the parameters can be retrieved via ParameterType and ParameterName.

This property 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 'MyReport.dr'

    Procedure OnInitializeReport
        String sReportId

        Forward Send OnInitializeReport

        Get psReportId to sReportId
        Set psParameterValue sReportId 0 to 'ACME'
    End_Procedure
End_Object

Object oRunReportButton is a Button
    Set Label to 'Run Report'

    Procedure OnClick
        Integer iParameter
        String sReportId sParameterValue

        Send RunReport of oReport

        Get psReportId Of oReport to sReportId
        Get ParameterIdByName of oReport sReportId "CustomerID" to iParameter
        If (iParameter > -1) Begin
            Get psParameterValue of oReport sReportId iParameter to sParameterValue
        End
    End_Procedure
End_Object