Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Divide by zero error Post Reply Post New Topic
Author Message
stevbren
Newbie
Newbie
Avatar

Joined: 20 Nov 2007
Online Status: Offline
Posts: 33
Quote stevbren Replybullet Topic: Divide by zero error
     Posted: 20 Apr 2008 at 8:34am
I get this error and can't do anything with the report I wrote. Some fileds are zero. How do you handle this. I have looked in the book and can't find a reference to it.
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 21 Apr 2008 at 12:13am

before dividing check the value e.g

if a> 0 and b > 0 then
  a/b
else
  0
Thanks
Savan
IP IP Logged
stevbren
Newbie
Newbie
Avatar

Joined: 20 Nov 2007
Online Status: Offline
Posts: 33
Quote stevbren Replybullet Posted: 22 Apr 2008 at 10:17am

Great. This was one of those very focused moments where the forest was not clear through the trees.

 

IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum