reporting-servicesrdlccrosstab

Horizontally and vertically Totals in RDLC Matrix


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.

enter image description here

I have used Add Total Row/Column but it gives me wrong results. What should be issue.? Any Help..


Solution

  • 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.

    enter image description here

    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.

    enter image description here

    To add the column select the [month] column (second column), right click it and select insert column then outside group - right.

    enter image description here

    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:

    enter image description here

    Let me know if my answer helps you.