2
votes

I want to show two columns on the report. One is "Amount", which is a field from a SQL Server table, and another one is "Balance", which is the column I derived in the report. The first value of "Balance" is the same as "Amount". Since the 2nd row, the value of "Balance" is the sum of the value from the previous row of "Balance" and that from the current row of "Amount". You can imagine how easily you can achieve it if using Excel. I tried to use function "previous", but I'm not sure how to get the previous value of "Balance", because it's not a field in SQL Server table.

1
By "derived in the report" do you mean you added a calculated field to your dataset? You can refer to calculated fields just as you would any other column.StevenWhite

1 Answers

2
votes

if we want to sum with current row to previous row we may using RunningValue . using runnningvalue we can sum of current row to previous one. here i set expression for balance field

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

enter image description here