Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not able to sum empty cells when pulling from an Access Query 1

Status
Not open for further replies.

aynu

MIS
Joined
Nov 5, 2007
Messages
8
Location
US
Data set from Access Query

ID Code 105 Code 466 Code GTL Code 100
1268 24.87 46812.32

( note that Code 105 and Code 466 are empty cells)

To sum all the codes for ID 1268 I'm using the crystal formula below...which gives me nothing

{Total_022908.GTL}+
{Total_022908.100}+
{Total_022908.466}+
{Total_022908.105}

However, if I remove the empty cells and you the formula below... I get something

{Total_022908.GTL}+
{Total_022908.100}


What can I do to be able to sum all of our codes for all ID's ( I have over 5000 ID's) and each ID may have a value in different codes so I would like to list all of the codes in the formula.
 
You could either go to report->check "convert nulls to default values" or you could set up the formula like this:

(
if isnull({Total_022908.GTL}) then
0 else
{Total_022908.GTL}
) +
(
if isnull({Total_022908.100})then
0 else
{Total_022908.100}
) + //etc.

-LB
 
Thanks...works like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top