ParameterType - cDRReport¶
Methods - Properties - Events
Method Type¶
Function
Return Type¶
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, which can be represented as C_USEMAINDRREPORTID. |
iParameter |
The number of the parameter whose type should be retrieved. |
Description¶
Returns the type 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 parameter number 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 beforehand.
DataFlex Framework Usage¶
- Web
- Windows
- FlexTron
Sample¶
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
End_Object
Object oGetParameterTypeButton is a Button
Set Label to 'Get Parameter Type'
Procedure OnClick
String sReportId
Integer iType iValue
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
Get ParameterType of oReport sReportId 0 to iType
If (iType = SQL_INTEGER) Begin
Get ParameterValue of oReport sReportId 0 to iValue
Send Info_Box ('Parameter 0: Type: Integer Value: ' + Cast (iValue, String))
End
Send CloseReport of oReport sReportId
End
End_Procedure
End_Object