ParameterIdByName - 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. The empty string can be written as C_USEMAINDRREPORTID. |
sParameterName |
Name of the parameter. |
Description¶
Returns the parameter ID of a parameter whose name is passed.
The test is case insensitive and returns a negative value when it fails. The return values are:
| Value | Description |
|---|---|
-1 |
No parameter with the passed name found. |
-2 |
Report engine busy. |
-3 |
Invalid report ID passed. |
This method 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'
End_Object
Object oRunReportButton is a Button
Set Label to 'Run Report'
Procedure OnClick
Integer iParameter
String sReportId
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
Get ParameterIdByName of oReport sReportId 'Year' to iParameter
If (iParameter > -1) Begin
Set psParameterValue of oReport sReportId iParameter to 1999
End
Send OutputReport of oReport
Send CloseReport of oReport sReportId
End
End_Procedure
End_Object