User`s guide

7.
Click Print Preview on the Standard toolbar to see the values in the report and compare the
fields to check if the field values returned by @Formula4 are correct.
You should see "TRUE" next to all Customer IDs that begin with 5 and "FALSE" next to all Customer
IDs that do not begin with 5.
Now that the formulas are error-free and the field values returned are correct, you will create a formula
that links the separate components together. You will begin by linking the first two formulas (@Formula1
and @Formula2) and then you will add @Formula3 and @Formula4 to create the final formula
@FinalFormula.
20.7.2.6 Formula1+2
1.
Create a new formula called Formula1+2.
2.
Type the following in the Formula text box of the Formula Editor:
If {customer.CUSTOMER NAME} [1 to 2] = "Bi" and
ToText({customer.CUSTOMER ID}) [1] = "6" Then
"TRUE"
Else
"FALSE"
3.
Place the formula to the right of the @Formula4 field.
You should see "TRUE" next to each customer whose name begins with Bi and Id begins with 6, and
"FALSE" next to all Customer IDs that do not meet this criteria.
If this formula is working correctly, you can create one last formula adding the code from @Formula3
and @Formula4.
20.7.2.7 FinalFormula
1.
Create a new formula called FinalFormula.
2.
Type the following in the Formula text box of the Formula Editor:
If ({customer.CUSTOMER NAME} [1 to 2] = "Bi" and
ToText({customer.CUSTOMER ID}) [1] = "6") or
({customer.CUSTOMER NAME} [1 to 2] = "Ro" and
ToText({customer.CUSTOMER ID}) [1] = "5") Then
"PREFERRED CUSTOMER"
Else
"DOESN'T FIT CRITERIA";
3.
Place the formula where you want it to appear in the Details section of the report. You can now
delete all other formula fields from the report. See Deleting formulas.
You can use this same process of condition-by-condition testing for any formulas as a means of
systematically checking them.
2012-03-14439
Using Formulas