Edit

If...Else if...End if

The If ... Else if ... End if parts are used to specify conditional output. The expression in the If statement is evaluated when the report is run, and if it is true the parts up to the corresponding Else part are output. If the expression is false, the parts between the If and its corresponding Else or End if are skipped.

If

The If part is use to specify the expression to be tested. Enter this in the field supplied, or click the Edit button to bring up the standard calculation editor window. The expression should evaluate to true or false (or if numeric, 0 is false, anything else is true). There must be a corresponding End if part for each If part.

Note:  If parts can be nested within other If parts up to nine levels deep.

Else if

The Else If part marks the end of the true part of an If section in a report, and hence can only be used if there is a preceding If part. You only need to have this part if there is an alternative to the If, and it will only be evaluated if the preceding If parts (or Else If parts for a compound statement) evaluate to false.

An optional expression can be specified as part of the Else if part. If this expression is present, the subsequent parts (down to the next Else if or End if part) will only be output if the expression evaluates to true. If the expression is omitted, the subsequent parts down to the associated <EquationVariables>End if</EquationVariables> are output regardless.

End if

The End if part must be used to mark the end of an If block.