Click here to Skip to main content
15,894,180 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Comments
ChrisTopherus 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.

you can do this also...
VB
{fielda} / iif({fieldb}=0,1,0)

Happy Coding!
:)
 
Share this answer
 
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!
 
Share this answer
 
yes friend you have to check your formula code ...
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900