Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link back to parent report in SSRS

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

like image 265
Purplegoldfish Avatar asked Jun 17 '11 10:06

Purplegoldfish


3 Answers

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.

like image 78
peter Avatar answered Sep 21 '22 16:09

peter


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

like image 21
jimconstable Avatar answered Sep 21 '22 16:09

jimconstable


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

like image 29
Daniel Avatar answered Sep 18 '22 16:09

Daniel