Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dive By Zero Error Encountered

Posted on 2014-01-20
5
Medium Priority
?
263 Views
Last Modified: 2014-02-07
Hello All,
I have report whose data is got from a storeprocedure.When I execute the proc I dont get any error. But when I preview the report it gives a :
Divide by zero encountered.
Please help.
0
Comment
Question by:Star79
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:John_Vidmar
ID: 39795086
In Crystal Reports, review your report formula's to see if you are using division, and alter them to do something different when zero is in the denominator.
0
 

Author Comment

by:Star79
ID: 39795100
The entire data set is returned from the proc there is no formula been built in the report which is quite confusing for me.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39795377
There is probably a formula that does a division.

If it is a Crystal error, it should take you to the formula that has the error.

The usual fix is to change the formula from

   A / B

to

If B = 0 then
  0
Else
   A/B

mlmcc
0
 

Author Comment

by:Star79
ID: 39795482
mlmcc,
iam surprised that the formula is present in the storeproc only and when I exceute the proc it runs but when I run the report ,it gives this error.The report has no formula field.
Please advice
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1500 total points
ID: 39795639
DOes the report filter the data?
You may need to change the SP to test for the 0 divide

mlmcc
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question