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

divide by zero 1

Status
Not open for further replies.

andie18

MIS
Aug 14, 2001
198
US
Hello,

I need to write a summary style report that exports into Excel. This report tracks # calls made, # appts. I also need the report to show the #hits of calls made. Which we will have a field filled out when they get a "hit" (whatever that is). We are using GoldMine w/ SQL backend and I am developing this in Crystal 8.5 developer.

I figured that the best way is to do a cross tab report and use the columns for the sales rep names (pulls from userid) and just display summarized fields. So far so good. But I am running into a problem with the % hit to calls. I thought that the simple formula: sum({@hit})/sum({@calls}) would do the trick but I get "division by zero" when i preview the report. Upon reflection, I think that having this formula in the summarized colmun is probably very bad, but I am not sure what else to do since I need it to neatly export to Excel.

any ideas?

TIA for the help
 
What I normally do when calculating % is have a if then else checking for a divide by zero. e.g

if sum({@calls}) = 0 then 0 else
sum({@hit})/sum({@calls})

Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top