January 7, 2012 at 2:27 pm
Hi SSRS Gurus and Novices,
I was going through a tutorial so that I could learn about adding report parameters to a report and one of the prerequisite is to add a Group to a report.
But I had trouble with the explanation.
Please refer to the following URL:
http://msdn.microsoft.com/en-us/library/ms170712.aspx
Any help would be greatly appreciated.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 12, 2012 at 10:53 pm
I believe the article is quite explanatory,but i do agree with you on the fact that Microsoft tutorials do get a bit confusing with all the links and subsections they keep referring to...
If you want to add row groups in your report you can do it in a couple of ways..(Using the tablix(table) cells or using the row groups report pane)..
The simplest approach to adding groups should be something like this: (this is how i like to do it , others might tend to differ on this)
1) Drag the table item on to your report design pane.
2) Fill up the table with fields that are to be displayed.
(Let me make it a bit graphical for your convenience, by taking an example)
| Country | Region | City |
| [Country] | [Region] | [City] |
3) Pick up the columns you want to create row groups on.
( in the above example we can create 2 groups
a) on country i.e. for each [country] value we'd want to see all corresponding [region] values
b) on region i.e. for each [region] value we'd want to see all corresponding [city] values )
4) Pick your innermost group column ( we have two grouping columns in our example : [country] & [region] the innermost therefore is [region].
5) Select the table on the design pane & in the "Row Groups" pane right click on "Details".
Select "Add Group" --> "Parent Group".
Tablix group window comes up.
Select the innermost group column ([region]) from the drop down list in the "Group By" pane.
6) As soon as you do this a new column with the same name (as the column you just grouped on) appears on the left of the table.
| Group 1 | Country | Region | City |
| [Region] | [Country] | [Region] | [City] |
This is the grouping column & hence the other column (with the same name - Region) towards the right of the table would not be needed, so it can be deleted.
| Group 1 | Country | City |
| [Region] | [Country] | [City] |
Also a new entry named "Group 1" is added to the "Row Group" pane.
7) To create the second group right click on "Group 1" and select "Add Group" -->"Parent Group" & select the outermost group column ([country]) from the drop down list in the "Group By" pane.
A new column is added to the left of the table which serves as the outer group column.
| Group 2 | Group 1 | Country | City |
| [Country] | [Region] | [Country] | [City] |
The other column (with the same name- Country) towards the right of the table would not be needed, so it can be deleted.
| Group 2 | Group 1 | City |
| [Country] | [Region] | [City] |
This creates your table with 2 groups.
You can now change the header of the newly created group columns .
Always remember to create group on innermost columns first & then move on to the outer group columns by adding parent groups.. Think of this as concentric circles of increasing radius, put the smallest circle first and then the larger ones in increasing order.
Hope this helps...
January 13, 2012 at 8:20 am
What do you mean by "Pick up the columns you want to create row groups on"?
Thanks for the explanation.:-)
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 15, 2012 at 5:31 am
Sorry for the confusion.
"Pick up the columns" as in decide the columns on which you want to create row groups.
Depending on the data you will have to decide the columns using which you can create row groups.
Hope I'm clear this time..
January 15, 2012 at 6:32 am
Thanks for the clarification.
I understand the grouping I was having a hard time getting the groups to appear in the correct sequence.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply