Topic: dealing with nulls when adding columns Posted: 24 Apr 2008 at 1:13pm
Hello, I am very new to crystal reports and have problem you can help me solve.
I have a data set that contains null values and when the columns are added together no total is summed because of the null value.
You can see below the five columns that are being added together. The last column is the one that sometimes contains a null. When it does contain a null the total for that particular row is not summed up using the formula below. My question is how do I replace the null with zero so a total can be summed. I would rather change the report then change the stored proc in the database that is gathering the data.
You can see I made an attempt to deal with the null in the last column, I found this on this forum. Unfortunately this does not seem to work. Any thoughts on how I can deal with this?
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 24 Apr 2008 at 6:36pm
I'm not sure why the last statement doesn't work b/c that is what I would do. But an easier way to handle this is to go to the menu options File > Options > Reporting tab. Click the NULL checkboxes so that nulls are converted to zero (or an empty string).
I cover how to handle nulls in your formulas in Chapter 6 of my Encyclopedia book. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum