Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS Display dataset results horizontally

I have the following data in my dataset

| Person | Bonus   |
  John   |  15,000
  Mary   |  20,000
  Steve  |  5,000
  Betty  |  10,000

I want to layout my table to that the rows appear horizontally instead of vertically

John      15,0000        Mary      20,000
Steve     5,0000         Betty     10,000

How can I do this with SSRS 2008 ?

like image 510
Scott Avatar asked Nov 13 '12 15:11

Scott


1 Answers

For the rows to appear horizontally rather than vertically you want to add a column group on the person's name. Right-click on a Detail cell in your table, click Add Group and click Column Group - Parent Group and Group By Person. This will display the Person as a column that expands horizontally, kind of like a matrix.

However, the layout you show is more like using multiple column layout. To use multiple columns, click anywhere on a blank area of the report and go to the Properties window (don't right-click and select Properties as the Columns property is not displayed on the pop-up dialogue in SSRS 2008), expand the Columns property and enter 2 for Columns, then layout your report as usual taking care that the multiple columns plus column spacing doesn't exceed the width of your page.

Note that not all renderers support multiple columns, including the report designer and the standard HTML web renderer, so they will display only one column regardless - Print and PDF do support multiple columns. However, there is a hack you can use to fake displaying multiple columns using two tables.

like image 104
Chris Latta Avatar answered Sep 28 '22 17:09

Chris Latta