January 27, 2013 at 7:14 am
What is this mean in SSRS expression:
=code.Utility.SafeDivide( Sum(Fields!A.Value), Sum(Fields!B.Value) )
What if I take it out code.Utility.SafeDivide, how can I apply the same expression as above?
January 28, 2013 at 1:50 pm
girl_bj0619 (1/27/2013)
What is this mean in SSRS expression:=code.Utility.SafeDivide( Sum(Fields!A.Value), Sum(Fields!B.Value) )
What if I take it out code.Utility.SafeDivide, how can I apply the same expression as above?
This calls code that is embedded in the report. I believe you can find the code in BIDS under the SSRS menu. If you don't have the embedded code in the report, there is no way to tell exactly what it does. Presumably it is some sort of divide by zero or other error handling. I use something very similar. The expression equivalent without any error handling is probably Sum(Fields!A.Value)/ Sum(Fields!B.Value)
With some error handling it is something a little more like this
IIF(Sum(Fields!B.Value) = 0,0,Sum(Fields!A.Value)/ Sum(Fields!B.Value) )
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply