RpReport:SetWhileExpression() Method

<< Click to Display Table of Contents >>

Navigation:  RpReport Class >

RpReport:SetWhileExpression() Method

Previous pageReturn to chapter overviewNext page


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


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


cExpressionThe new while 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 to implement a print while condition.  Records are included into a section until the while expression returns FALSE (or there is no more records to process). This must be a valid expression or an empty string ("") to clear the while condition.


If you use fields in the expression, it is necessary to call RpReport:Connect2Source() prior to setting the while expression..


// Set the while expression in section 2

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