Question

Filtering nested table in SSRS 2005

Asked by: lilycollins

I have report with a table and two nested tables in the footer of the main table. The report is providing sales information for different retail outlets.  The idea being that the main table summarises information about the retail outlet and the two nested tables show details of current retail activity and future retail activity for the retail outlet identified in the main report.

The table is set up as follows:
Report Header
Report Body
    Parent Table
        Table Group (repeats and new line after group, grouping on a dataset field value)
        Table Footer Row 1 - nested table 1 (filtered on date parameters)
        Table Footer Row 2 - blank row (to allow spacing between nested tables
        Table Footer Row 3 - nested table 2 (filtered on date parameters)
Report Footer

There is no detail row in the parent table.

Users select a variety of parameters to choose the retail outlets for review and can choose one, more or all of the outlets.

I am using the same dataset for all data regions (there is no need to really split up the datasets as the only difference between the current and future sales figures is the date they occur, all other fields are the same so there's no data redundancy by combining the queries).

When I run the report for a single retail outlet all works perfectly.   However, when I try to choose multiple retail outlets, the information for all outlets is combined and repeated on each page, i.e. I am grouping the main table by the retail outlet name, however, the current/future sales are being driven by the report parameters selected and not the retail outlet of the main report.

I believe I can achieve what I want by using sub reports but for scalability and performance I would prefer not to use sub reports (most places including MSDN suggest that data regions should be used in preference to sub reports).

I had thought to create a filter for the nested tables but I can't quite see how to get the correct value, I tried adding a filter to compare the retail outlet name field in the nested table to the reportItem containing the retail outlet name in the main report but I can't use ReportItems in filters.  I think it must be because the grouping I am using on the table isn't passing down to the footer of the table where I have the two nested tables.

Any help would be gratefully received.

Thank you.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-03-10 at 11:04:39ID24217079
Tags

SSRS

,

reporting services

Topics

MS SQL Reporting

,

SQL Reporting

,

Databases Miscellaneous

,

MS SQL Server

Participating Experts
1
Points
500
Comments
13

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Acessing textbox value on footer in SSRS 2005
    Hi i have a text box in Page footer of my report. It has some value as i cant directly diplay that value in report table as they dont accept Max( Reportitems!textbox.value) function in the report table. Now i want to show that value or acess that value from my report ...
  2. SSRS Wizard
    Hi I am new to SSRS. I am crating a Report via the Report Wizard. Once I have completed the wizard and clicked finished is there a way to open the wizrd back up to make changes to the report? Thanks nutnut
  3. SSRS report header/footer
    I am enhancing an SSRS in VS2005. As I try to deploy the SSRS, I get errors saying: Error 18 [rsFieldInPageSectionExpression] The Value expression for the textbox po_ctrl_int refers to a field. Fields cannot be used in page headers or footers. c:\ztest\report project1\Em...
  4. Is it possible to use different filters on nested data regions?
    I am trying to put together a report with SSRS 2005 that has two nested tables to show current and future sales for retail outlets. A separate page(s) should be created for each retail outlet showing a heading with the name of the retail outlet. The nested tables are showin...
  5. Subreport Footers in the main report  (SSRS)
    Hi, I have a main report and 5 other subreports.Each of these subreports contains multiple datasets and each subreport has different footers on it .I know that there is no way to get the subreport footers direcly to the main report in SSRS 2005.But I guess there will be an a...
  6. SSRS dataset
    Hi, I have a table which looks like this. S-table ----------- studentid grade rank startdate end date I am trying to generate a bar chart using ssrs 2008 which would show the total number of students enrolled vs total students dropped(exit). the query looks somethin like ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: lilycollinsPosted on 2009-03-13 at 11:02:28ID: 23882031

I am able to create the functionality I want to have to a point using a parent list rather than a parent table (although I would still love to know what I am doing wrong with my table approach, I suspect there's an issue somewhere with grouping although the parent table is grouped).

But only to a point.

The tables I am nesting have the same underlying dataset, but different filters to restrict the data for each.  So the first nested table gets the rows before a specified date (captured using parameters) and the second nested table gets rows after the specified date.

I have a rectangle in the list that contains information about the retail outlet - essentially the group header.  If the nested tables return no rows or only the second table has rows returned, the information in the list header is blank.  I have no filter on the list only filters on the nested tables.  

If data is returned for both nested tables the header information in the list shows up correctly.

Am I missing the point with this?

Subreports are really not an option as the performance is horrendous.

 

by: TheLearnedOnePosted on 2009-03-14 at 06:00:42ID: 23886577

I would love to help, but you would need to get me up to speed.  

 

by: lilycollinsPosted on 2009-03-14 at 16:12:14ID: 23889011

I am trying to create a report with a report header, a group header and two nested tables that provide detailed information about the item in the group header.

The group header is the name and other details e.g. address about a specific retail outlet and the two nested tables are showing sales before a specified date (passed as a parameter) and after a specified date.

I am using the same dataset for all data regions.  The nested tables have filters to get the relevant information e.g. sales less than or equal to XX/XX/XXXX and sales greater than XX/XX/XXXX respectively.  I don't want to use subreports as they are too inefficient for what I need to do.

I have tried two different approaches firstly using a table as the containing data region and secondly, when I couldn't get the table version to work, using a list.  I am using SSRS 2005.

With the table, the group heading worked perfectly but the nested data was amalgamated together i.e. sales data was appearing for all retail outlets in each table - the grouping obviously wasn't being applied.

In the second approach, the grouping was being applied to the detailed sales information but when there were no records being returned  or no records returned in the first table, the group header was not displayed.  If the retail outlet had sales information in both tables the header and all sales information was exactly as it should be.

I am really frustrated with this as I have no idea what I'm doing wrong and despite having trawled through every possible article or book I can find I clearly don't fully understand the processing that's going on.

I would be eternally grateful if you could help in any way.

 

by: lilycollinsPosted on 2009-03-14 at 16:31:23ID: 23889084

I should add I need to have a page for each retail outlet regardless of whether or not there are past or future sales.  I would simply have the group heading and then an empty table for past sales and future sales in these cases.

In instances where there are no sales I have done an outer join in SQL which just generates the relevant retail outlet data with NULL (so nothing as far as SSRS is concerned) values for all the sales columns.

 

by: TheLearnedOnePosted on 2009-03-15 at 11:08:10ID: 23892452

It might help if you attach a .png screen shot of how you configure the report, or a sample .rdl or .rdlc file that I could work with.

 

by: lilycollinsPosted on 2009-03-16 at 07:28:59ID: 23898087

Do you need the full rdl with the SQL text etc?

 

by: TheLearnedOnePosted on 2009-03-16 at 07:34:13ID: 23898135

I would think that a screen shot would be sufficient for me to modify my test report to get to the same place, so that I can test for myself.

 

by: lilycollinsPosted on 2009-03-16 at 08:50:40ID: 23899109

Here you go.  Thank you.

So to summarize.  When I use a table grouped on Outlet name.  I would get all the current sales listed under 25 Conduit Street, not just the ones for 25 Conduit Street.  The nested tables are in the footer of the container table that has the Outlet Name, Budget Sales Percentage and Number of Staff as the group header for the containing table.

 

by: TheLearnedOnePosted on 2009-03-16 at 12:11:41ID: 23901225

That is a good picture, but I would prefer one of how it is in the designer, and not the rendered output.

 

by: lilycollinsPosted on 2009-03-17 at 00:13:48ID: 23905301

I have been able to generate the report without using any nested tables and applying two levels of grouping namely on:

  1. retail outlet (outer grouping, with page break after group) 
  2. sales type (inner grouping, using a new column added to the dataset based on a case statement to identify if a sale is for the current year or future years). 

Thank you for trying to help me.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...