0
votes

I am converting crystal report to SSRS and i need to group by a variable. I grouped by the variable and report looked fine except for one thing. Consider the following which was grouped by Section (row grouping)

+---------+------+----------+
| Section | Name |  Number  |
+---------+------+----------+
|       1 | AAA  | 111-1111 |
|         | BBB  | 222-2222 |
|         | CCC  | 333-3333 |
|       2 | DDD  | 444-4444 |
|         | EEE  | 555-5555 |
+---------+------+----------+

The only thing i am trying to achieve is to have the section number as a heading instead of the column and it is not the column group i am talking about. So the report i am trying to achieve is to move the section as the heading to each group and the report would look like

+-----------+----------+
| Section   | 1        |
|Name       | Number   |
| AAA       | 111-1111 |
| BBB       | 222-2222 |
| CCC       | 333-3333 |
| Section 2 |          |
| Name      | Number   |
| DDD       | 444-4444 |
| EEE       | 555-5555 |
+-----------+----------+

I have been trying to make this change but end up changing the structure of the report. when i googled about grouping it gave me column level and row level grouping which i understand to some extent but could not figure out changing the Section so any help related to this will be very helpful.Any links are also welcome to get grouping like this. And i am not grouping in the query, so the query is straightforward select statement.

1
It's hard to describe, but make a row-group, as though you were going to do sub-totals for each section, and then just don't put any sub-totals in.. just the Section Header. Hope that makes sense. - Tab Alleman
I am not really sure i understand. What exactly you mean by sub-totals? The value of section need not be an integer, it can be something like "OrderA". - Pete sam

1 Answers

0
votes

I'm assuming you're table looks something like this in SSRS with it being grouped by Section:

enter image description here

If you put into those two empty textboxes 'Section' and then the second one is an expression that points to the value of the section group by textbox I think you will get what you want. Just like this second picture below:

enter image description here

This is the expression in the second textbox. ReportItems is all the names of the text boxes, tables, lines, labels etc...that are in the report so if you find the name of the textbox that is the section group row and reference it in the <<Expr>> it should work. And then just minimize the actual section group by column

enter image description here

here is the result that I got using some test data etc. You can see the Actual Section Groupby column is very small to the far left. There might be a way to hide that column completely.

enter image description here