Simple way to show multi column data in SSRS (Horizontally or Vertically)

Published on
20,626 Points
7 Endorsements
Last Modified:
When we create a simple report in SSRS data show in one column. (To start using SSRS see this link Creating a Report Server Project ).

In this article we want create a report to show data in multi-column (Horizontally or Vertically).
For example: if we have one table with name [Table1] and one field  [No] and inserted number from 1 to 100  in this  table.

If we create a simple report in SSRS and show data on it
we see this report

but we want see multi-column  report like this

How can we do that?
1. We create a report using BIDS (used in this article ) or other tools  
after that  delete all object on it to see this picture.

 2.  Put a Matrix on report like this (Matrix is in {ToolBox} under {Report Items}).

In bottom we see [RowGroup] under Row Groups and [ColumnGroup] under Column Groups.
3. RightClick on  [RowGroup] and click Group Properties.
4.Click {Fx} to appear Expression window then insert this expression in top textbox

=ceiling(rownumber(nothing) / 3)


Then click two OK.

5.  Do  stage 3 to 4 for  [ColumnGroup]  but only in expression window type this

=ceiling(rownumber(nothing) mod 3)

Then click two OK.

Number 3 in above formulas show count of column in report result.If we need more column can change it in  above formulas.

6.Now RightClick on Data part of Matrix and select {TextBox Properties}

 It will be open a new window. we fill combobox with field [No] which has been defined in Table1.

Click OK.
7.Now click preview to see

8.If we have more than one field in table we can use {InsertGroupRight}

9.If we want show result vertically swap two formulas together.(In stage 4 use this formula
=ceiling(rownumber(nothing) mod 3) and in stage 5 use this =ceiling(rownumber(nothing) / 3) )

I hope this article be useful.
Ask questions about what you read
If you have a question about something within an article, you can receive help directly from the article author. Experts Exchange article authors are available to answer questions and further the discussion.
Get 7 days free