Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've searched already and don't see (or can't decipher) a solution for my issue. I have SSRS emailing a report for 1 district (with 12 retail stores). However, each Region has over 8 Districts, and I need to put each District on its own tab. I have multiple tabs working, but I'd like to avoid creating each sheet if possible. I also need to generate 4 of these master spreadsheets - is there a way to make some sort of template for one worksheet using parameters? We're using SQL Server 2008 R2 and Report Builder 3.0

share|improve this question
up vote 3 down vote accepted

Ini. My first thought here is that you could use a List control to iterate across Districts. SQL Server MVP Jes Borland has a great intorductory post on Lists here:

Inside the list control will be a rectangle. By setting the Page properties of that rectangle, you can create yours tabs for each District, dynamically setting the Page Name property to an expression that returns the District.

You could configure your dataset (ideally, a stored procedure) to take the Region as a parameter and then you can run this ONE report for each of your Regions and they will all work the same and keep you from having to create multiple copies of the same object.

Assuming I understood your question correctly, this should get you moving in the right direction.

share|improve this answer
That is exactly what I needed! Thank you. Does anyone have a link for a good blueprint/tutorial for using stored procedures in SSRS? I'm having some trouble making sense of the few that I've looked at – ini Mar 8 '13 at 16:33

Beyond @MarkVSQLIsHandsomeAndWitty's response, another option for creating each worksheet from SSRS is to just use a page break to per district. When that exports to Excel, they go to different tabs. Last time I tested it, I had an issue wherein subsequent tabs always had a leading empty row but that's been a few years.

You can further automate it by calling the render method for the report with the Region code in the URL with a flag for output to be Excel, write that bytestream out to a file with an xlsx extension and blammo, you have automated your Excel extracts.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.