How to display a subreport on the same report when a link is clicked.

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  reporting services   » How to display a subreport on the same report when a link is clicked.

How to display a subreport on the same report when a link is clicked.

Topic RSS Feed

Posts under the topic: How to display a subreport on the same report when a link is clicked.

Posted: 4/21/2010

Jedi Youngling 30  points  Jedi Youngling
  • Joined on: 12/21/2009
  • Posts: 14

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.


Posted: 4/21/2010

Jedi Master 5963  points  Jedi Master
  • Joined on: 11/2/2009
  • Posts: 251

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.

Toggle visibility of subreport


Posted: 4/22/2010

Jedi Youngling 30  points  Jedi Youngling
  • Joined on: 12/21/2009
  • Posts: 14

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.

 

 


Posted: 4/22/2010

Jedi Master 5963  points  Jedi Master
  • Joined on: 11/2/2009
  • Posts: 251

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.


Posted: 4/23/2010

Jedi Youngling 30  points  Jedi Youngling
  • Joined on: 12/21/2009
  • Posts: 14

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.


Posted: 4/23/2010

Jedi Master 5963  points  Jedi Master
  • Joined on: 11/2/2009
  • Posts: 251

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.


Posted: 4/23/2010

Jedi Youngling 30  points  Jedi Youngling
  • Joined on: 12/21/2009
  • Posts: 14

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.

 

 


Posted: 4/23/2010

Jedi Master 5963  points  Jedi Master
  • Joined on: 11/2/2009
  • Posts: 251

Great! No problem.


Page 1 of 1 (8 items)