RpReport:SetFilterExpression() Method
<< Click to Display Table of Contents >> RpReport:SetFilterExpression() Method |
![]() ![]() ![]() |
Purpose
This method allows you to specify the filter expression for any section of a report.
Syntax
<oReport>:SetFilterExpression(cExpression, [nSection]) logic
Arguments
cExpression | The new filter expression for the specified section. |
nSection | Optional section number. The default is the first section after the optional title section. |
Description
To set an optional expression used as a filter. The filter determines which records are included in the primary section. The assigned value must be a valid expression or an empty string ("") to clear the filter expression.
If you use fields in the expression, it is necessary to call RpReport:Connect2Source() prior to setting the filter.
Example
// Set the filter expression in section 2
oReport:SetFilterExpression("MyTable.MyField > 1", 2)