How to link back to parent report in SSRS

点点圈 提交于 2019-12-03 16:34:57

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

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.

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!