How to link back to parent report in SSRS
Asked Answered
P

5

6

I have some reports with drilldown, and I have now been asked to add a breadcrumbs style navigation to the report so the user can access the parent report again without having to use the litte 'back' button.

I was wondering if there was an easy way to do this? Currently I havent been able to find anything on the interwebs.

My solution right now is to pass the parameters for the parent report to its child then have a link back to the report using those parameters, however this really isnt the ideal solution.

Thanks

Paganism answered 17/6, 2011 at 10:58 Comment(0)
S
4

You solution is pretty much what I have done. I don't think there is a way to make the parent "remember" the parameters.

Shade answered 19/6, 2011 at 5:25 Comment(0)
S
6

I have just implemented this using a standard hyperlink and a bit of javascript.

  1. Add a textbox and set the text to something appropriate (e.g. "<< Back")

  2. Set the action to "Go to URL" and set the URL to "javascript: history.go(-1)" (case sensitive).

  3. I also formatted the text in blue and underlined to make it obvious it is a hyperlink

This code just uses javascript link to emulate clicking the Back button, so only goes back one level.

NOTE that this doesn't work in the Preview pane in SSRS, but does work in the browser (if you have javascript enabled).

If you have a number of levels and a rigid structure through which to drill down, you could implement a full breadcrumb trail by having multiple links and replacing -1 with -2 (to go back up 2 levels), -3 (to go back 3 levels) and so on.

Streamway answered 5/12, 2011 at 17:2 Comment(0)
S
4

You solution is pretty much what I have done. I don't think there is a way to make the parent "remember" the parameters.

Shade answered 19/6, 2011 at 5:25 Comment(0)
A
1

I have added Parameter called "SpParentParam" and passed it to Child report. This parameter will have the parameters of the parent report. In my case, the parent report had multiple parameters which can be null and the child report did not know which specific parameters were used in the parent report

Assam answered 22/8, 2012 at 21:26 Comment(0)
M
0

Similar to what peter has suggested but using "Go To Report" option in "Action" option (Right Click on "<> Action >> Go To Report).

After you add the report that you are supposed to go to, DO NOT FORGET to add the parameter that the report needs (one to which you are going to), this works in preview mode as well as after deploy.

Hope this helps.

Marikomaril answered 25/3, 2015 at 15:24 Comment(0)
G
0

Just in case anyone else is searching for this 6 years later, I tried Peter's method, which worked in IE, but apparently "broke" in Edge. Technically, it still worked, but the report needed to be rerun, prompting for the parameters again.

I had one detail report that was being called by several parent reports. I have the parent reports passing the report name and required run parameters (they all use the same set of parameters) to the child report.

Since the report parameters are specified per report when using the open report action, I had to set the parameters up as if I was hard-coding the report and then change the report field to the function that called my report name parameter.

Hope this helps someone else stuck on this issue post I.E.

Guiana answered 25/6, 2021 at 18:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.