13,293,173 members (38,260 online)
Rate this:
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.

Sucharitha
Posted 31-Dec-12 1:48am
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:

## Solution 2

Add a simple check for zero to it.
`{fielda} / {fieldb}`

Check it first:
`If {fieldb} = 0 then 0 else {fielda} / {fieldb} `

Good luck!
Rate this:

## Solution 3

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

Happy Coding!
:)
Rate this:

## Solution 1

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

Top Experts
Last 24hrsThis month
 Jochen Arndt 340 OriginalGriff 288 Dave Kreskowiak 205 CPallini 100 ppolymorphe 100
 OriginalGriff 2,066 Jochen Arndt 1,130 Richard MacCutchan 1,040 CPallini 875 ppolymorphe 874