RpReport:SetFilterExpression() Method

<< Click to Display Table of Contents >>

Navigation:  RpReport Class >

RpReport:SetFilterExpression() Method

Previous pageReturn to chapter overviewNext page


This method allows you to specify the filter expression for any section of a report.


<oReport>:SetFilterExpression(cExpression, [nSection])  logic


cExpressionThe new filter expression for the specified section.
nSection        Optional section number.  The default is the first section after the optional title section.


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.


// Set the filter expression in section 2

oReport:SetFilterExpression("MyTable.MyField > 1", 2)