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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report 9i -- How to display zero in Weighted Average 1

Status
Not open for further replies.

aksm47

Programmer
Apr 2, 2004
6
US
Hi,

I have a problem in displaying zero for the Weighted average that has zero for denominator.

Right now, my report display "Empty" values for the weighted average column (Response Rate).

e.g. Mail Response Response Rate
100 50 0.50%
0 0
200 100 0.50%

I want it to display as

e.g. Mail Response Response Rate
100 50 0.50%
0 0 0.00%
200 100 0.50%


Thanks.

Drew



 
Start your formula with a clause that accounts for a zero denominator:

if {table.mail} = 0 then 0 else
<your weighted average formula here>

-LB
 
The weighted average is from the "Summary" of crystal report. I have no control on it, it just automatically changed the values into empty. Is there any way to set the option for "Summary" function in crystal report that could resolve this?

Thanks.

-AK
 
File -> Report Options -> make sure Convert other NULL values to default is ticked.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top