Click here to Skip to main content
12,633,079 members (33,028 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB 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 1:48am
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.
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!
:)
  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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2016
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