Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Simple Tablix Group Expand / Collapse
Author
Message
Posted Thursday, April 4, 2013 8:50 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 9:26 AM
Points: 60, Visits: 345
Hi guys,

Hope someone can help a very simple question. I'm trying to build a table with a simple total of amounts per year e.g.
2010 2011 2012
Count(ID) Count(ID) Count(ID)

The query underneath is just doing a basic select of a number of fields off a table, no grouping or aggregation of any kind.

The way I initially tried to do this was create a column group of year, with a count wrapped around each ID. I thought that it would group the count per the column group but this was not the case. Instead it performed a count of 1 as in 1 instance of each ID.

As a work around I simply added a total underneath the ID (Details) column which performed the count per year correctly, however I had to make the details row invisible in order to get it to appear correctly.

I know that it might be easier to perform the aggregation in the actual query or perhaps to use the matrix (although I don't want a row grouping) but if someone can direct me if I'm just missing something with tablix grouping it would be appreciated.

Thanks
Post #1438844
Posted Thursday, April 4, 2013 9:44 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Friday, October 24, 2014 9:55 AM
Points: 1,485, Visits: 1,036
A tablix is going to display 1 row for each row in the dataset unless you create a row group.
That's all there is to it.

Your probably getting some cool display like
2009 2010 2011 2012 2013
1
1
1
1
1
1 1 1 1 1

You can cheat and hide the detail row and Simply just display the total row.

But usually in this scenario there would be some requirement to group the "Sales by Year" etc.

Your assumption to perform the aggregates in the dataset is correct. the more rows you send to the report server the slower the rendering will be.
Post #1438872
Posted Thursday, April 4, 2013 9:50 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 9:26 AM
Points: 60, Visits: 345
Thought as much, thanks for the reply mate
Post #1438877
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse