How to create a summary row for grouped columns

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

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

Please note that calculating the amount is not my problem. I am only looking for a way to tell the report viewer to combine cells created automatically through a group of columns for a specific row.

Update
Unfortunately, so far I have not found a solution for this. Moreover, the same question that I also met in a report where I had to add the totals of a row group in a combined column.

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

I find this a fairly common way to display totals. Is this not possible in any case, or am I not seeing something obvious?

Update2
Here is a screenshot of what I mean:

Spanning Category Total

In the middle there is a group. This creates n columns at runtime. What I want to do is "general coverage category" to cover all dynamically created columns. This means that columspan cells are n . There is only one cell, and in this cell I will show the total number of all categories. It is almost the same as a report viewer, automatically created at the top of the group.

+8
reporting-services ssrs-2008 rdlc rdl report-viewer2010
source share
3 answers

I don’t know if you found the answer to this question, but if not ...

Typically, 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 level of grouping, you can achieve what you want by inserting your tablix into an external tablix, and then adding a line to an external tablix that summarizes the data there.

I used several data areas inside rectangles and lists to manage all types of layouts. You just need to play around with the areas and possibly set up the output (sums / means by group in the stored procedure) if these areas just don't interact. Let me know if it solves your problem.

+1
source share

As I know, rdlc are report files that you edit in the Report Wizard or visual studio, unlike rdl, which are report files developed by BIDS.

I don’t know if this will work on rdlc files because I only use BIDS, but I think it’s worth a try:

  • on the row group tab (left), right-click on your group and select add total β†’ after, it will add a general row.
  • temporarily copy the amount cell (total) to another place on the report (because the next step will delete it if you do not)
  • using SHIFT, select a cell by cell in the row you want to combine (do not select the row)
  • right click and select merge cells
  • paste the cell of the amount that you copied in step 2

Result (I hope you will see):

enter image description here

EDIT:

answering your question, yes, I am sure that this can be done, because I did it several times, and also you saw on the print screen. I am inserting XML for my string, I think the secret is in the <ColSpan>8</ColSpan> . I have 8 columns in my report.

 <TablixRow> <Height>0.25in</Height> <TablixCells> <TablixCell> <CellContents> <Textbox Name="textbox18"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Sum(Fields!myField.Value)</Value> <Style> <FontFamily>Tahoma</FontFamily> <FontSize>9pt</FontSize> <Format>'$'#,0.00;('$'#,0.00)</Format> </Style> </TextRun> </TextRuns> <Style> <TextAlign>Right</TextAlign> </Style> </Paragraph> </Paragraphs> <rd:DefaultName>textbox16</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <BackgroundColor>White</BackgroundColor> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> <ColSpan>8</ColSpan> <rd:Selected>true</rd:Selected> </CellContents> </TablixCell> <TablixCell /> <TablixCell /> <TablixCell /> <TablixCell /> <TablixCell /> <TablixCell /> <TablixCell /> </TablixCells> </TablixRow> 
0
source share

Since it looks like you have a dynamic group of columns, you probably put in the columns:

Fields! ColHeading.Value | Total
Fields! DataValue.Value | = SUM (Fields! DataValue.Value)

If you prefer a graphical interface, right-click the full field value and click Expression. In the drop-down list, expand General Functions and click "Aggregate" and in the "Element" window, double-click "Amount". Enter or click the data field and you will get something like this: Filled out Expression Window .

Hit Good, and you're good to go!

-one
source share

All Articles