Monday, March 12, 2012

expressions based on subtotals

How do I create calculated fields based on subtotals?

SSRS 2005 doesn't support aggregates over aggregates. You should try deriving the total from the details. If you need absolutely to use subtotals, you can write a simple function that let you set/get the total, e.g.

Dim _total as Double

Sub SetTotal (ByVal total As Double) As Double

_total = total

return total

End Function

Function GetTotal() as Double

return _total

End Function

Then, in subtotal textboxes, change their values to =Code.SetTotal(Fields!FieldName.Value). When you need the total call GetTotal, e.g. =Code.GetTotal(). Of course, in real life it may need to write more complex logic to maintain the totals.

|||Thanks for the feedback, I'll give it a try I'm actually trying to create report to emulate growth over period(OLAP) for an Informix datasource I want to see the difference of the yearly subtotals Still exploring options|||was able to nest a table within a matrix and do all my calculations

No comments:

Post a Comment