Language:


Syntax

You should use the following syntax in your "Print If" conditions, in the Formula field in the 'Selection' dialogue box and in the 'Code' dialogue box (all on the 'Data' card), and in the 'Formula' dialogue box ('Layout' card).

Relational Operators
==    is equal to
<>    is not equal to
!=    is not equal to
>    is greater than
>=    is greater than or equal to
<    is less than
<=    is less than or equal to

Do not confuse == with =. Use == when you need to compare two values, to ask if one value is equal to another. "Print If" and Overstrike conditions are appropriate places to use ==. Use = when you need to assign a value to a variable, typically after clicking the [Code] button. For example:

testvar == 1
when this appears in a "Print If" or Overstrike condition, it is asking if testvar is equal to 1.

testvar = 1
when this appears in a line of code, it is stating that testvar is now equal to 1. Any value that testvar had before this statement will be forgotten.
After clicking the [Code] button on the 'Data' card, you can enter an if statement in which both == and = are used:
if (var1 == 1) then begin var2 = 1; end;
In this example, there is first a test to see if var1 is equal to 1. If it is, then var2 is set to 1 as well. If it is not, then var2 retains the value it had previously.

Multiple Conditions
You can use multiple conditions with [Print If]. Join multiple conditions using the following logical operators:

and    both (or all) conditions must be met
or    at least one condition must be met
and !    the first condition must be met and the second must not be met.
or !    either the first condition must be met or the second condition must not be met.