Tuesday, February 23, 2010

Crystal Reports : Dealing with Zero and NULL Values (Part 2)

Depending on your usage, the returning of NULL (from a formula or running total) can be more stubborn at times.

First, check what NULL conversion options the report is using:

1. Select from the top level menu File | Report Options.
2. Look for the "Convert NULL field value to default" checkbox.

If this box is checked, NULL is returned as a special "automagical" DEFAULT value.
This typically will convert NULL to zero in formulas and running totals.

Folks who are using newer versions of Crystal will notice an additional checkbox in Report Options called "Convert Other NULL Values to Default".

This checkbox refers to the NULLs being returned by objects other than database rows (i.e. formulas and running totals). Typically a combination of both of these checkboxes is required to properly fix a zero totaling problem. (Depending on back-end database and usage)

As always, try it out.

5 comments:

Anonymous said...

Thank you.

Anonymous said...

Thanks, I which there was a way to automatically select what you want a default to be by data type. so instead of a 0 you can set it to say " - " instead. But I do thank you for your insight into this function.

Anonymous said...

Thanks - That helped me solved my report problem.

Manuel A. Jiménez Gómez said...

Thank you very much, sir!....

Saved me a lot of time with this one..

Anonymous said...

Yeah! It worked!