4

I am trying to generate subtotal of multiple columns in my Tablix, not in footer or header. I am using this expression:

=SUM(ReportItems!ColumnName.Value)

This one works fine in footer.But for my work requirements I can't use the footer and must show the subtotal in the same tablix. While doing so it shows an error like this-

Aggregate functions can be used only on report items contained in page headers and footers

Can anyone help me with this?

Rafat Ahmad
  • 169
  • 1
  • 10
  • what happens if you do something like this I tried it on my end with my reports and it works without having a Footer or Header `=Sum(Fields!PREVMONTH.Value, "Name of your Report.rdl")` – MethodMan May 31 '16 at 20:02
  • I knew that solution. But it works to calculate the grand total of my whole report. I used this expression to calculate the Grand Total in my the last page of my report, but I also need to show Subtotal on each page in the same tablix... – Rafat Ahmad Jun 01 '16 at 04:18

1 Answers1

4

Ok I've found a solution. First we need to select the tablix and Add Group for Row groups. enter image description here

Then we can use our desired fields to Group by and check in the "Add group footer". enter image description here enter image description here

After that from the Row Groups section we can find the group we have just created. Selecting Group Properties using right click to the group we can change any properties like pagebreaks. Now from the newly added row in our tablix we can use expressions to show subtotal. enter image description here

Then we can delete the column auto generated because of the group. enter image description here

Rafat Ahmad
  • 169
  • 1
  • 10