There is a function to force one formula to be evaluated before another you might try and play with: Evaluateafter(x):
EvaluateAfter (x)
Basic and Crystal syntax.
Arguments
- x is any valid formula name.
Returns
None
Action
This function can be used to force one formula to be
evaluated after another. For example, two separate formulas in your report may
have the same evaluation time (BeforeReadingRecords, WhileReadingRecords, or WhilePrintingRecords), or they appear in
the same section of the report and, therefore, are automatically evaluated while
records are printing. In such cases, it is often unclear which formula is
evaluated first.
In many situations, it may be unimportant which
formula is evaluated first. However, some situations may require that one
formula be evaluated after another. For instance, one formula may set the value
of a variable while the other formula reads the value of that variable. The
EvaluateAfter function can be used to force the second formula to be evaluated
after the first formula has completed.
Examples
The following examples are applicable to both Basic
and Crystal syntax:
EvaluateAfter({@SetVariable})
Forces the formula to wait until the
@SetVariable formula has completed calculations.