Create different tablix per region

Posted on 2014-07-24
Last Modified: 2014-08-16
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
    LVL 32

    Expert Comment

    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.
    LVL 32

    Expert Comment

    BTW, you should be able to suppress any empty pages (sheets) in SSRS,
    LVL 37

    Expert Comment

    "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.

    Accepted Solution

    I found my own solution:

    Create the group in your sql query.  Add the group to your tablix as a row group.

    Set the pagename on the textbox properties.

    Author Closing Comment

    by:Larita de Swardt-Steyn
    The only solution that worked.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now