reporting-servicesssrs-2012

How to refresh data in SSRS report accessed via ReportServer URL


I have a SSRS report that is accessed by users via the Web Service URL, we do this so we can pass in parameters.

e.g.

https://myserver.fqdn/ReportServer?/MyFolder/MyReport&rc:Toolbar=False&MyParameter=MyString

This works well the first time the report is accessed, but no amount of refreshing the browser will cause the data to refresh. I found I could fix this behavior by adding rs:ClearSession=True to the URL.

https://myserver.fqdn/ReportServer?/MyFolder/MyReport&rs:ClearSession=True&rc:Toolbar=False&myParameter=MyString

However this report also contains a number of Go to report actions. Clicking any of these actions strips the URL of the rs:ClearSession=True and now the reports contain old data.

Is there anyway to prevent the Web Service URL from doing any caching? This does not seem to be an issue when these reports are accessed via the Report Manager URL.

e.g.

https://myserver.fqdn/Reports/Pages/Report.aspx?ItemPath=%2fMyFolder%2fMyReport

Solution

  • You can force the data to refresh by changing the value of a parameter.

    You can exploit this by adding a hidden Date/Time parameter to each report. Within the Go to report action, assigning the new parameter a value of =Now() will change the value of this parameter each time the action is clicked.

    This works even if you don't use the parameter in your report.