Whenever there is a Null in any of the fields in a Crystal Formula it will not print the formula.
You will need to decide how you are are going to handle database NULLs in your Crystal Reports.
There are Check Box Flags
= Convert Database NULL Values to Default:
= Convert Other NULL Values to Default: (Like parameters in CR9 and later)
- in the File / Report Options menu -- to change the options for the Current Report
- and in the File / Options / Reporting menu -- to change the options for the Crystal Reports Editor and any New Reports.
You can check these boxes and your formulas will print "" where Nulls appear in a field, but the formula will still print.
However:
(a) If you choose to leave one or both of these NULL boxes unchecked, then you will need to use Null Checks like:
If IsNull({City}).... (Then do something)
or If Not IsNull({City}).... (Then do something)
in the first section of each Formula and Selection Filter where Nulls may be encountered. Null Checks must come before other Formula sections.
{b) If you choose to set one or both of these NULL boxes as checked, then:
To Check in a Crystal formula if Converted Null fields are blank you need to see if:
String Fields will = ""
Numeric Fields will = 0
Date Fields require special syntax --
ToText(DateField) = ""
Using Null Checks or Conerted Null Field Checks you can make a set of small Address, City, State, Zip formulas that can be combined into a final print address formula that looks good in most any case, whether some fields are Null at times or not.