Elon's Blog

Stuff that may be of use to someone…

Adding a Back Button to a SSRS Drill through Report.

Posted by Elon B. on July 31, 2010


You have a Reporting Services report viewed via a browser that has a drill-through to another report. When the drill through report is opened, you would like the user to be able to “jump back” to the previous parent report page. Users can use the browsers back button to do this, but you would like to place a more obvious link on the Report.


The following report was created using BIDS for SQL Server 2008. The same method can be employed for the 2005 version, though the dialog boxes may appear slightly different.

Open your drill- through report (i.e. the report you will be drilling to, from another ssrs report) and add a text box, which you can format to look like a button, if you wish.

After Adding the Textbox, View its Properties (right-click on textbox).

In the Textbox Properties Dialog box, Select Action, and check “Go to URL

Enter   javascript:history.back(1) in the entry box, then press OK.

When you deploy the report, and view it in your browser, the user only has to click on the “button” (Go Back)  to be returned to the previous browser page, which would be the parent report.


13 Responses to “Adding a Back Button to a SSRS Drill through Report.”

  1. Ted Smith said

    I did exactly as you said, but absolutely nothing happens when textbox is clicked.
    Maybe there are some other settings that need to be present in order for this to work?

    Thank you.


  2. Elon B. said

    Hi Ted,
    The example report shown above, is the report you have drilled through to, and assumes you have arrived at it from another ssrs report.
    Is that what you have done and arrived at your report from another ?


  3. Juliusz P. said

    Very good trick.
    Thank you


  4. Brilliant, exactly what I needed.

    Worked a treat!



  5. Debalina Santra said

    Hi Elton,
    Thanks for such a wonderful solution .
    i have visited lots of sites from past one month
    but didnt got any fruitfull result.
    finally i got the solution from here.
    Thank you.


  6. Chito said

    HI Elon’s

    Thank you very much for the trick. This is exactly what I am looking for.


  7. Isaac said

    Can i have a back button to on the same report?
    For example,
    when i click on a chart, the chart will have drill down function. At this moment, i want a back button for this report so that i can click on it to go back to the original report which is before the drill down happen.
    Is it possible to make it?


  8. Elon B. said

    If you want to go back two pages, try using this code:

    javascript: window.history.go(-2)


  9. musso007 said

    Does this work with FireFox? it seems like it’s not working. Any help would appreciate. Thanks


  10. MagicWallman said

    Change javascript:history.back(1) to javascript:history.back(0) if you want your parameters intact, works with SSRS 2008r2


  11. Reader said

    I am trying to use javascript:history.back(1) as suggested. But it does not preserve the parameters in Chrome or Safari. It works fine in IE. Help is appreciated.

    Liked by 1 person

  12. Kapil said

    This is for web application ..if i use this trick in winform application it not works……..Please help..


  13. Narmada Swain said

    Thank you Elon. I searched for 2days and finally this works.


Please Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: