Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pivot a table in reporting services?

Is it possible to pivote a table in reporting services 2008? If so, how? I'd like to pivote it 90 degrees.

Thanks

like image 705
Johan Avatar asked Jan 25 '12 12:01

Johan


1 Answers

In SSRS 2008, there isn't much difference between rows and columns.* A Table is an instance of a "Tablix" which has the detail group on the rows. You can have your table either repeat rows or columns based on the groupings and where the details group is set.

You can create a horizontally expanding table by:

  1. First create a Tablix by dragging the Matrix Report Item onto the design surface. The Tablix will have a RowGroup and a ColumnGroup by default.
  2. Delete the Row Group by right clicking on it and selecting "Delete Group" In the Delete Group prompt, delete just the group (Not related rows and columns; you'll probably want these as left label for your rows.)
  3. Add the Details group as a Child Group of the Column Group. Do this by Right clicking on the Column Group and "Add Group->Child Group..." Select Show Details Data.

The resulting tablix should look something like this:

Horizontally expanding Tablix

You can now add columns, rows, groups, etc.

*One minor difference that comes to mind is that you can merge cells horizontally, but not vertically.

like image 111
Jamie F Avatar answered Oct 15 '22 11:10

Jamie F