TestFilterFunction - 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. |
sFilterFunction |
The filter function to be checked. |
Description¶
Returns True if the syntax of the function is valid.
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
String sReportId
Boolean bOk
String sFilter
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
Move 'return ({customer.id} > 0)' to sFilter
Get TestFilterFunction Of oReport sReportId sFilter to bOk
If (bOk) Begin
Set psFilterFunction Of oReport sReportId To sFilter
End
Send DisplayReport Of oReport
End
End_Procedure
End_Object