Download User's Guide

Transcript
If {file.FIELD} = 5 Then
“Text String”
Else
“Another Text String”
OR
If {file.FIELD} = 5 Then
0
Else
1
NOTE: If-Then-Else formulas that use a Time or dateTime data type as a
Then action and a null or empty Time or dateTime as an Else action can
not be created because there are no null or empty values for those data
types. However, Time or dateTime values can be printed conditionally.
See How to print Time or dateTime values conditionally, Page 317.
How to print Time or dateTime values conditionally
To print Time or dateTime values conditionally (print a field if the condition
is met, print a field in another color if the condition is met, etc.), you can not
do it using an If-Then-Else formula because there is no such thing as an
empty or null value for the Time or dateTime data type. Instead, you insert
the field itself in the report and set its Suppress property conditionally.
1
Place the dateTime field where you want it to print on the report.
2
Select the field and click the OBJECT PROPERTIES button on the
supplementary toolbar. The Format Editor appears.
3
Click the Common Tab to activate it.
4
Click the FORMULA button to the right of the Suppress property.
5
Type the following formula into the Formula Editor when it appears.
{employee.LAST NAME} <> “Fuller”
Now when you run the report, the program will print the dateTime field
whenever the employee last name is Fuller and it will suppress the field
when the last name is anything but Fuller.
How to create multi-condition If-Then-Else formulas
The If-Then-Else operator can be used to create powerful multi-condition
formulas.
Advanced Formulas
317