|
HI Everyone, I have a bit of an issue coming up with an expression that if a Here is what I tried and got an error... The Error is...
I should also note that
All the help would be greatly appreciated
(comments are locked)
|
|
=Fields!Sum_UNITS.Value is the expression and its taking values from ResidentDays Dataset Thanks for all the help and Ideas. I went a different route and found the answer. What I did was write custom code to devide the expressions from different datasets. .... Public Function DivideBy(ByVal Exp1, ByVal Exp2) If Exp2 = 0 Or IsNothing(Exp2) Or IsDBNull(Exp2) Then DivideBy = 0 Else: DivideBy = Exp1/Exp2 End If End Function Then on the textbox with the expression I put in.... =Code.DivideBy(Sum(Fields!AMOUNT.Value,"OperRev"),Sum(Fields!Sum_UNITS.Value, "ResidentDays")) That fixed my issue.
Sep 24 '12 at 04:02 PM
tombiernacki
(comments are locked)
|
|
Try this. ..... That unfortunately did not fix the error. I put =IIf(Fields!Sum_UNITS.Value."ResidentDays"= 0,"0.00", Sum(Fields!AMOUNT.Value)/Sum(First(Fields!Sum_UNITS.Value, "ResidentDays"))) and I receive the following error message. The Value expression for the textrun ‘Textbox330.Paragraphs[0].TextRuns[0]’ uses a First, Last or Previous aggregate in an outer aggregate. These aggregate functions cannot be specified as nested aggregates.
Sep 20 '12 at 09:42 PM
tombiernacki
could you provide the expression for SumUNITS?
Sep 20 '12 at 10:31 PM
jjaroska
(comments are locked)
|
|
Thanks for all the help and Ideas. I went a different route and found the answer. What I did was write custom code to devide the expressions from different datasets. .... Public Function DivideBy(ByVal Exp1, ByVal Exp2) If Exp2 = 0 Or IsNothing(Exp2) Or IsDBNull(Exp2) Then DivideBy = 0 Else: DivideBy = Exp1/Exp2 End If End Function Then on the textbox with the expression I put in.... =Code.DivideBy(Sum(Fields!AMOUNT.Value,"OperRev"),Sum(Fields!Sum_UNITS.Value, "ResidentDays")) That fixed my issue.
(comments are locked)
|
|
Ok. I missed that on the original post. As of right now, SSRS can't do an expression with fields from 2 different datasets. What I would do is to move those calcs to the stored procedure or view and the send that new field through to the report.
(comments are locked)
|

