Groups | Blog | Home
all groups > sql server reporting services > june 2005 >

sql server reporting services : Dividing by 0


Knolls
6/14/2005 10:48:13 AM
From sample posted, I tried the following but results in #error. Any
suggestion?
Here is the actual expression:
= Iif(Fields!cprice.Value - Fields!ccommission.Value = 0,0, (100 *
Dave Klug
6/14/2005 11:36:02 AM
I've had the same issue. To get around it, I've written a custom function
and then return the value to the report.

[quoted text, click to view]
chicagoclone
6/14/2005 1:06:06 PM
this should work

= Iif(Fields!cprice.Value - Fields!ccommission.Value = 0,0, (100 *
Fields!ccommission.Value/iif(( Fields!cprice.Value-
Fields!Average_Cost.Value)=0,1,( Fields!cprice.Value-
Fields!Average_Cost.Value))))

[quoted text, click to view]
AddThis Social Bookmark Button