Finalformula – HP Intelligent Management Center Standard Software Platform User Manual

Page 585

Advertising
background image

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.

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.

Crystal Reports 2008 SP3 User's Guide

585

22

Using Formulas

Debugging formulas

Advertising