Division by Zero error in Crystal Reports

Posted by Rrana under VB.NET on 12/31/2012 | Points: 10 | Views : 2798 | Status : [Member] | Replies : 3
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 Goud
Bank Of America..



Responses

Posted by: Baimey on: 12/31/2012 [Member] Starter | Points: 25

Up
0
Down
Use the below code,
If isnull(Count({Table.Property})) then 0 else(1 / Count({Table.Property})).

Else please give ur code where this exception rise so we can analyze and find

Please Mark as Answer If this Helps

Rrana, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baimey on: 12/31/2012 [Member] Starter | Points: 25

Up
0
Down
Else there is one more option

Before the code that shows error
if {Property} =0 then 0 else
------ do the required function-----------


So that the zero values are filtered


Please Mark as Answer If this Helps

Rrana, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baimey on: 12/31/2012 [Member] Starter | Points: 25

Up
0
Down
http://books.google.com.kw/books?id=isoPezxjvo8C&pg=PA128&lpg=PA128&dq=divide+by+zero+error+in+crystal+report&source=bl&ots=aJWllnzKOd&sig=9dP2w7XDeihrCsGsTVl9q9Lb6lY&hl=en&sa=X&ei=oX7hUInQJIaYtQbJ-oFQ&ved=0CGsQ6AEwBQ#v=onepage&q=divide%20by%20zero%20error%20in%20crystal%20report&f=false

The above book will give you more idea

Please mark if any answer have helped So this post will move to the resolved category.

Thanks
Baimey

Please Mark as Answer If this Helps

Rrana, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response