Solved

SSRS Matrix report with Drilldown/Subreport

Posted on 2010-11-12
9
2,563 Views
Last Modified: 2012-05-10
I have a matrix report that contains a part number, partname and job number in the rows.  The columns are the months/year for the next 12 months.  The detail is a sum of parts due for each of those months.

I now want to add either a subreport or drilldown capability to the report.  When you click the Job number it should show details about the job (amount of parts ordered, how many were shipped and on what date, how many are in process, etc.).  I can get it to work with a drilldown report by setting the toggle item for all of the details to the job number.  The issue I have is that the job number column looks like it is about 6" wide because of the details columns.  I want it to be normal width until you click the toggle switch, then open up the details below the job number.  

I have tried inserting a subreport into the matrix but have not had any luck.  It doesn't seem to link the 2 reports correctly.

Any help on how to accomplish this would be appreciated.  Please provide details, I am a novice with SSRS reports.
0
Comment
Question by:PsychoDazey
  • 4
  • 3
9 Comments
 
LVL 21

Accepted Solution

by:
Yurich earned 500 total points
ID: 34131922
Hello,

The sub-report will work for you - I tested and if it's set to invisible, then it will not be expanded.
To add a sub-report to your matrix (presuming it's 2005, slightly different for 2008):
 - Click a detail field (where you have your sums) and select "Add Row"
 - Drag and drop a sub-report control in the new field
 - Right-click your sub-report and set the sub-report name and its parameters (two different tabs)
 - Select your sub-report field again and go to the properties (F4)
 - Set in the Visibility "Hidden" to true and select a toggle item. That can be a bit tricky as it will allow only fields that are in the same group or in the containing group.

That should be all.
Good luck :)
0
 
LVL 6

Author Comment

by:PsychoDazey
ID: 34133189
Hi Yurich -

Its SQL 2008 R2.  How would I add the subreport to that version?  And as for your last bullet point "That can be a bit tricky as it will allow only fields that are in the same group or in the containing group."  Does that men I have to have the fields from the subreport in the main report also?  Or just in the dataset?
0
 
LVL 21

Expert Comment

by:Yurich
ID: 34133205
Hello,

You just open a control panel with your controls and drop your sub-report control in the extra field under your sum-field you created. The wording for "Add Row" might be different somewhat for 2008. I don't have 2008 installed handy, so can't tell you exactly to a letter what it will say.

As for the fields, no, you don't need to have any extra fields anywhere. The structure of the matrix is based on groups and even a detail row is a group (i.e. your sum field). So your sub-report will be a part of a group as soon as you drop it on your matrix. You shouldn't worry about this too much - when you get to the point of setting visibility for your sub-report, you'll have only allowed controls in your Toggle Item drop-down box. So if you pick one, it will surely work.

Cheers
0
 
LVL 10

Expert Comment

by:itcouple
ID: 34139938
Hi

Recently I had a request to display limited number of info and I have decided to use a tooltip :) The user reaction was very positive.

also just something to be aware (not necessarily in this case).... If you use subreports and they contain shared dataset it will not display them in preview but they will work correctly when you deploy everything

Hope that helps
Emil
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 6

Author Comment

by:PsychoDazey
ID: 34198690
I still haven't gotten this to work.  I want the main matrix report to show the part number, part name and overdue in the grouping columns.  In the details will be my quantities due with the dates as headers.  My sub report will show the job number(s) and details of that job for each part number.  I want to toggle the display of the sub report by part number.

When I try to expand the subreport I get an error and it closes BIDS.  Emil, is that what you meant when you said it wouldn't display correctly in preview mode?
0
 
LVL 21

Expert Comment

by:Yurich
ID: 34213850
I never had any problems with sub-reports not displaying. To eliminate possibility that it's your report viewer, you can try deploying your report and sub-report to the server and see if you're getting the same error. There is a chance that you'll see more details about the error on the server.

To see if you have some subtle problem with your query or report/sub-report design, delete the sub-report that you have now and create a new one. In this sub-report show some literal text (e.g. "testing sub-report"). See if it's working. Than you can add a parameter to your sub-report and pass it from your main report. Set your sub-report to display your parameter and see if it's working. If you manage to get that far, you can try re-creating your original sub-report to display your job details. Sometimes, re-creating a new report is easier and faster than trying to fix the existing one. Especially if you experimented a lot with it. Removing and deleting things (i.e. controls, data objects, etc.) from report not always work neatly - there can be still traces and dependencies left in the XML file which you will not see or know on from the design view.

Good luck
0
 
LVL 6

Author Comment

by:PsychoDazey
ID: 34275440
Thanks for all the suggestions so far.  I had to put this aside for right now, I am dealing with a server migration but will return to this hopefully Monday.
0
 
LVL 6

Author Comment

by:PsychoDazey
ID: 34740012
Yurich actually gave me all of the information I needed on this, I neglected to come back and close.  please allow me to award the points and I will close the question properly.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

895 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