How to use js history.back(1) in Chrome

Yvonne Lindberg 1 Reputation point
2021-04-07T10:36:47.667+00:00

Hi,
We have just migrated from 2012 to 2016 SSRS reports. So far it was no problems. However When testing the js script to go back to parent report when we opened reports in Chrome. We loose all the choices made at first. This works in IE but not in Chrome. And since IE is not supported after the summer we have been testing in Chrome and Edge and it dosen't work in either of them.

How can we get this function to work when we need to change the browser?
Best Regards,
Yvonne Lindberg

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,941 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Lukas Yu -MSFT 5,821 Reputation points
    2021-04-08T06:16:33.643+00:00

    Hi,

    This is not a particular SSRS issue.

    It is a change need to be made for chrome browser. Change the js code to : window.history.go(-1) it should work. You could see the thread here : onclick=“history.go(-1)” not working in Chrome

    Reagards,
    Lukas

    0 comments No comments

  2. Yvonne Lindberg 1 Reputation point
    2021-04-08T08:11:07.17+00:00

    Hi Lukas,
    I have read that thread as well and I tried yours suggestion. But the same thing happens as with history.back() I loose the previous parameters chosened from the beginning. Can I change something in Chrome or Edge? Whick setting could I change to make this work?
    I have been looking for answers in the other threads as well but haven't found anything that helps with this problem.

    Since IE will not be supported I think there must be something i could do for customers to still be able to use their ssrs reports. And it doesn't matter if it is Chrome or Edge. But at the moment I get the same problem in both of the browsers.

    Best,
    Yvonne

    0 comments No comments

  3. Lukas Yu -MSFT 5,821 Reputation points
    2021-04-12T02:08:42.347+00:00

    Hi Yvonne,

    This code runs in browser that doesn't has the capability to remember the parameters.

    You would need to use the "go back to parent report" button in report tool bar that discussed in this thread : Keep parameter value when coming back from subreport

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.