Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Hi All,
 
I am creating one crystal report.
In that report i have used formula fileds.when i place that formula field in report it shows Division by Zero error.
 
But formula filed having the value.I don't know why it is showing that error.
 

Please any one advice me
 
Thanks in advance
Sucharitha
Posted 31-Dec-12 0:48am
Comments
ChrisTopherus at 31-Dec-12 6:52am
   
Can you be a bit more precise? Maybe with a little source... The only thing i can say at the moment is: it's not allowed to divide anything by zero.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Add a simple check for zero to it.
Instead of:
{fielda} / {fieldb}
Check it first:
If {fieldb} = 0 then 0 else {fielda} / {fieldb} 
 
Good luck!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

you can do this also...
{fielda} / iif({fieldb}=0,1,0)
Happy Coding!
Smile | :)
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

yes friend you have to check your formula code ...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 521
1 OriginalGriff 349
2 DamithSL 235
3 Maciej Los 170
4 Bruno Sprecher 130
0 DamithSL 185
1 OriginalGriff 105
2 Peter Leow 60
3 Maciej Los 50
4 abhijeetgupta1988 45


Advertise | Privacy | Mobile
Web01 | 2.8.141030.1 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100