I am using RDLC Reports in VS 2015 with SQL Server 2014
. I have a Matrix
Report in which i need totals both horizontally and vertically. DataSet have Columns Item,Month and Amount
. I need below report format.
I have used Add Total Row/Column
but it gives me wrong results. What should be issue.? Any Help..
You can achieve the required totals using scoped SUM
expressions. Supposing you have created the needed rows and columns groups, use a matrix with the following data arrangement.
Note in your case it is
[Sum(Amount)]
instead of[Sum(Value)]
in my case.
For showing the totals just add the row and the column outside the groups item
and Month
respectively.
Select the [item]
row (second row) and right click, go to insert row
and select outside group - below
.
To add the column select the [month]
column (second column), right click it and select insert column
then outside group - right
.
Now add these expressions in the highlighted cells in red, check the first image.
1: =Sum(Fields!Amount.Value,"Month")
2: =Sum(Fields!Amount.Value,"item")
It will produce the following matrix:
Let me know if my answer helps you.