psFunction - 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. |
sFunctionName |
Name of the function to retrieve or set the contents of. |
Description¶
Sets/Gets the contents of a function defined in the report.
If the report does not contain a function with the passed function name, you will get an error. You can use the function FunctionIdByName to find out if a function with a certain name exists or not. This function will return the function id, and when this is -1 (negative 1), the function does not exist.
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'
End_Object
Object oRunReportButton is a Button
Set Label to 'Run Report'
Procedure OnClick
String sReportID
Send OpenReport of oReport to sReportId
Set psFunction of oReport sReportId 'Version' to 'return "1.0.0.15"'
End_Procedure
End_Object