How to create totals row for grouped columns

HCL picture HCL · Apr 19, 2012 · Viewed 18.9k times · Source

If have an rdlc-report with grouped columns within a tablix (table). I want to add a footer row that spans all dynamically created columns and shows a total for all columns together. How can I tell to a cell that it should span all created columns created by the group?

|-------|-------|-------|
| col 1 | col 2 | col 3 |
|-------|-------|-------|
|   Column-Group Total  |
|-----------------------|

Please note, calculating the total is not my problem. I'm only searching for a way to tell report viewer to merge cells that are created automatically through a column-group for a specific row.

Update
Sadly, up to now, I have not found a solution to this. Moreover the same question I also have encountered in a report where I had to add totals of a row-group in a merged column.

|------|-------|
|row 1 |       |
|------| Row-  |
|row 2 | Group |
|------| Total |
|row 3 |       |
|------|-------|

I find this a quite common way of showing totals. Is this not possible in either way or am I missing something obvious?

Update2
Here a screenshot of what I mean:

Spanning Category Total

In the middle there is a group. This creates at runtime n columns. What I want to do is the "spanning category total" to span all dynamically created columns. This means, that the columspan of the cell is n. There is only one cell and in this cell I will show the total of all categories. It's quasi the same as report viewer creates automatically at the top of the group.

Answer

horinemj picture horinemj · Jun 12, 2012

Don't know if you've found an answer to this, yet, but if not...

Usually, totals are expected in the last column for data grouped in columns and the last row for data grouped in rows...

However, depending on the scope, and the level of grouping you have, you might be able to achieve what you want by embedding your tablix into an outer tablix, and then adding a row to the outer tablix that sums the data there.

I have used multiple data regions within rectangles and lists to manipulate all kinds of layouts. You just have to play around with scopes, and possibly adjust your output data (sums/averages by groups in stored procedure) if those scopes just aren't cooperating. Let me know if it solves your problem.