Link to home
Start Free TrialLog in
Avatar of Larita de Swardt-Steyn
Larita de Swardt-Steyn

asked on

Create different tablix per region

Hi there,

I need help please.

I have an ssrs report, that has 2 parameters.  Company and Product.  

Company A -    Product 1

Product 2

Company B - Product 3

Product 4 etc

I have one main dataset with data as follows:

Region, Product, Value

I need to somehow create a different tablix for each region, as we need to export the report to Excel, and each region needs to be a separate sheet, with sheet name  (Product - Region).

Iv'e created a region row grouping.  This works if I filter the group, and I hardcode the region name.  However not all the regions have data for a particular product.  This now produces an empty sheet.

Is there any way to make the group filter dynamic?  To somehow loop through the regions in the dataset and create a tablix for each region?

Or should I use a different approach?

Any help will be greatly appreciated.

Thank you
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

How this is done depends on what version of SQL Server you are using.  If you are using 2008 R2 or later, see this technet article for an overview on how to use pagination to create multiple tabs in an Excel spreadsheet.

If you are using an earlier version of SQL Server, then one starting place is this discussion in the MS social forum for Reporting Services. Note that prior to 2008 R2, there was no real way to get the individual tabs named.
BTW, you should be able to suppress any empty pages (sheets) in SSRS,
"However not all the regions have data for a particular product.  This now produces an empty sheet."

Are you sure your dataset is returning what you expect it to return?  As far as I understand your request, it should not return records for regions that don't have any product data, otherwise you'll indeed end up with "empty" region groups.
ASKER CERTIFIED SOLUTION
Avatar of Larita de Swardt-Steyn
Larita de Swardt-Steyn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Larita de Swardt-Steyn
Larita de Swardt-Steyn

ASKER

The only solution that worked.