• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Dive By Zero Error Encountered

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
Star79
Asked:
Star79
  • 2
  • 2
1 Solution
 
John_VidmarCommented:
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
 
Star79Author Commented:
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
 
mlmccCommented:
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
 
Star79Author Commented:
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
 
mlmccCommented:
DOes the report filter the data?
You may need to change the SP to test for the 0 divide

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now