I have a report that has a matrix and a chart on it. I have the report setup so that when you click on the Reject field in the matrix it will open up the detail report in a seperate window displaying the detail for those rejects. The client would like to have the detail information displayed as page 2 of the report instead of opening up seperate. My question is how do I display the subreport in the same report when they click on the Reject field? Has anyone done something like this? Thanks in advance.
To display the subreport on your report, drag the Subreport tool from the tool box into your design area. Right-click on it, select subreport properties, and select which report you wish to use as the subreport. Then under visibility, select Hide, and then check the "Display can be toggled by this report item:" check box and select whichever item you want to use to toggle the visibility. Now when your client clicks the specified report item, your detail subreport will display within your report.
I did that now I''m getting this error [rsInvalidToggleItem] The subreport ‘DMT_Details’ has ‘REJECTS’ as a toggle item. Toggle items must be text boxes that share the same scope as the hidden item or are in a scope that contains the hidden item, and cannot be contained within the current report item unless current grouping scope has a Parent.
[rsInvalidToggleItem] The subreport ‘DMT_Details’ has ‘REJECTS’ as a toggle item. Toggle items must be text boxes that share the same scope as the hidden item or are in a scope that contains the hidden item, and cannot be contained within the current report item unless current grouping scope has a Parent.
You are getting this error because the sub report is not in the same scope as the REJECTS text box. Patrick Leblanc has a good example of something similiar to what you are trying to do, I think: http://www.bidn.com/articles/reporting-services/107/ssrs-%E2%80%93-creating-a-master-detail-report. His article on creating a master and detail report is pretty straight forward.
That is exactly what I'm trying to do thank you. The problem I'm running into is my group scopes are different. I need to figure out how to get around that.
I don't know if this is an option, but you could just create an extra text box with the text "View Detail" in it and use that to toggle the detail report since your groups are in a different scope.
I got it figured out with the help of Patrick that wrote the article you refered me to. What I ended up having to do was create a dummy parameter I called it DisplayDetail. In the Action property of the textbox I was clicking on to get the detail. I added my DisplayDetail parameter and set the value to 1 in the expression. Then in the visibility property "Show or hide based on an expression" of my subreport I check to see if the DisplayDetail parameter value is = 1. The first time the report is ran it is not so my subreport is not displayed. When the user clicks on the reject value of a certain month. The report runs again this time displaying the subreport based on the parameters passed to it. Thanks for all your help.
Great! No problem.