Crystal Report formula generally used to Count, Summarize, or any other Arithmetic function in Crystal Report. Depends on query result, the value for one of the field either NULL or NOT NULL.
The problems are:
Formula in Crystal Report wouldn’t count or do any arithmetic function, if the component of the formula is NULL, then the result will be shown as Empty. (Sometimes causing error while executing crystal report).
Example 1: String1 + NULL , will show empty result, the expected result is String1
Example 2: 1000 + NULL, will show empty result, the expected result is 1000, we can suppose that NULL should become 0 (zero), so the result still 1000
Also read:
There are 2 methods to prevent this problem.
- Change the query so the NULL result will have its own default value
- or change setting in formula editor in Crystal Report in highlighted area, to the Default Value for Nulls.
If the component type is integer, this setting will change the NULL value to zero.
If the component type is string, this setting will change the value into ” (empty string).
The default value for this settings is Exceptions for Nulls, and show the empty as the result of NULL components.The rest of formula still use same method.
Also read: