Search code examples
visual-studiovisual-studio-2010reporting-servicestabularssrs-tablix

How do you make horizontal table in SSRS


Not exactly sure how to explain what I need, best way to describe it is a "horizontal table". I've looked at other examples on here and can't find exactly what i am looking for. Best way to explain is with pictures.

What I have currently:

Now

What I want:

Later

I haven't really found a way to achieve this.

This is what my visual studio looks like to achieve my current wacky layout:

visual studio


Solution

  • In order to solve this you'll need to add a calculated field that you can group the columns by. This will prevent them from moving further to the right after each row group.

    The calculated field should be a column number used for grouping. For example you could use something like :

    ROW_NUMBER() OVER (PARTITION BY WORK_ORDER ORDER BY RESOURCE_ID)
    

    In other words, within each work order, each Resource ID will have a different column number associated with it.

    Next, go to the Column Group properties and group it by this new field. Now all the 1's for each work order will be in the first column and so on.