FunctionCount - 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. |
Description¶
Returns the number of functions defined in the report. The count includes both built-in and self-defined functions. A built-in function has no name, and testing the result of psFunctionName can be used to determine if the function is a built-in function.
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 previously.
DataFlex Framework usage¶
- Web
- Windows
- FlexTron
Sample¶
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
End_Object
Object oShowFunctionCountButton is a Button
Set Label to 'Count number of functions'
Procedure OnClick
String sReportId
Integer iCount
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
Get FunctionCount of oReport sReportId to iCount
Send Info_Box iCount 'Number of functions defined'
Send CloseReport of oReport sReportId
End
End_Procedure
End_Object