7
votes

I have webapplication having SSRS Reports...

I have a situation where i have to Update sum of particular field into last column for all above row up to current row..

for example..

ID    Balance    Total
----------------------
1     100        100      
2     200        300  
3      10        310
4    -100        210
5     200        410

In Above table, last column Total makes sum of value of Balance column of all above rows.. how can i achieve this ?

Thanks..

1

1 Answers

6
votes

You can use the RunningValue expression for this sort of thing, see:

RunningValue Function (Report Builder and SSRS)

This works for your data and example:

enter image description here

A simple table based on this:

enter image description here

The Total expression is:

=RunningValue(Fields!Balance.Value, Sum, Nothing)

Which gives the expected results:

enter image description here

Depending on your exact setup, you may need to change the Scope parameter to a Group or Dataset value, but Nothing works in the typical case.