RpSection:SetVarInitExpression() Method
<< Click to Display Table of Contents >> RpSection:SetVarInitExpression() Method |
![]() ![]() ![]() |
Purpose
To set the expression that initializes a ReportPro variable.
Syntax
<oRpSection>:SetVarInitExpression(cName, xExpression) 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. |
Description
The Init Expression of a variable is the expression that is evaluated to set the initial value of a ReportPro variable when the variable is reset. This method returns a TRUE if it is successful; otherwise, it returns false.
Example
oRpSection:SetVarInitExpression("MyVar", "0")
oRpSection:SetVarInitExpression("MyVar2", " 'string value' ")