By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,398 Members | 933 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,398 IT Pros & Developers. It's quick & easy.

Convert a sum in a report from a null value to zero

P: n/a
I created a report that utilized the sum function. however if there is
a result that is 0 is doesn't display 0, it shows as null (blank) how
can I get it to display the 0's in my report when there is no data that
was summed?

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Cruisemate" wrote
I created a report that utilized the
sum function. however if there is
a result that is 0 is doesn't display 0,
it shows as null (blank) how can I
get it to display the 0's in my report
when there is no data that was
summed?


The NZ function converts a Null to Zero; if an actual zero result is
displaying as blank, you should use the Format property of the Control and
make certain it does not have an entry for 0 that shows blank.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #2

P: n/a
I"m not sure how to use the NZ function within the report. The format
property does not have an entry for 0 that shows blank.

Nov 13 '05 #3

P: n/a
"Cruisemate" wrote
I"m not sure how to use the
NZ function within the report.
The format property does not
have an entry for 0 that shows
blank.


I could assume from your question that you have a Control on the Report with
a ControlSource of =Sum([SomeField]). It would be helpful if you'd include a
bit more detail with your question (but not enough to bury us in detail
<GRIN>).

If the values in [SomeField] are Null, then nothing will show. You could try
using as ControlSource the expression =
IIF(IsNull(Sum([SomeField]),"0",Sum([SomeField])) -- in a simple test case
where there were no "matching order detail records", thus giving a Null
summation, it worked for me.

Be sure to rename Controls so they do not have identical names to the
underlying Fields, if either are used in calculations.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.