RpReport:SetVarUpdateExpression() Method

<< Click to Display Table of Contents >>

Navigation:  RpReport Class >

RpReport:SetVarUpdateExpression() Method

Previous pageReturn to chapter overviewNext page

Purpose

To set the update expression of a ReportPro variable.

Syntax

<oRpReport>:SetVarUpdateExpression(cName, xExpression, [nSection])  LOGIC

Arguments

cName

The name of the ReportPro variable.

xExpression

This parameter can either be a string representing the expression to be macro compiled or a codeblock.

nSection

Optional section number.  The default is the first section after the optional title section.

Description

The Update Expression of a variable is the expression that is evaluated to update a ReportPro variable before the Body Band is printed. This method returns a TRUE if it is successful; otherwise, it returns false.

Example

oRpReport:SetVarUpdateExpression("MyVar","0")

oRpReport:SetVarUpdateExpression("MyVar2", " 'string value' ")

Note:        This method searches for the variable in the primary section of the report.  It may be necessary to call RpReport:Connect2Source() before using this method.  See the entry for Connect2Source() for more information.