Steve Cross
Steve Cross

Reputation: 99

How can I have multiple tables on one SSRS page that represents one value in SQL?

I have developed a one page report that has 4 tables on it. I am happy with this result:

enter image description here

This is shown for one district. (district = '002') The dataset only has the one district selected. I want to select multiple districts (a SQL field) in the dataset and have multiple pages representing one district per page. So, to state in a different way, there are about 10 districts so I want to have 10 pages just like this one with one district per page. It seems like there should be some sort of grouping option so I can show this page for each district. I'm new to SSRS so I'm probably missing something obvious. Thanks!

Upvotes: 2

Views: 6452

Answers (1)

StevenWhite
StevenWhite

Reputation: 6034

This set of tables can be repeated for each selected district with one set on each page. To achieve this, you can take advantage of nested tables.

  1. Create a new table with one row and one column.
  2. Set it to be grouped on district.
  3. Set the group to page break after each instance. And optionally set the page name to be the district. This way, if you export to Excel, the sheets will be properly named.
  4. Insert all the other tables into a Rectangle. This is a way of keeping the formatting of the other tables in tact and handle them all together.
  5. Drag the rectangle into the new one-cell table.

Now the small table will repeat the entire contents of the rectangle for each district and you get copies of the entire report on separate pages.

Upvotes: 3

Related Questions