Why is my SSRS report showing old data?

2020-02-10 11:46发布

I have a live report that's somehow showing cached data despite the fact that I've disabled all caching (that I'm aware of). When I run the query in the BIDS query editor, it shows the current data. But in the BIDS preview and the actual deployed report, it's still showing out of date data.

I tried toggling the report caching on then back off in the report properties on the reporting website, and I went into the IIS HTTP Header properties and set content to 'Expire Immediately'. I've seen this issue before in the BIDS preview window due to the .data file stored with the report definition (which I've deleted/refreshed several times), but I've never seen it happen with a live report.

Is there another caching option somewhere that I'm missing?

Edit: The report also has a user-selected parameter, which makes this even more perplexing since I was under the impression that parameters cause SSRS to use the most recent data even when caching is enabled.

9条回答
贪生不怕死
2楼-- · 2020-02-10 12:24

Always run this report with the most recent data Do not cache temporary copies of this report

  1. Double check if the above options are selected under Processing Options via ReportManager.
  2. check if your dataset is querying the current data.
  3. Refresh the Report.

That's very weird.

查看更多
Deceive 欺骗
3楼-- · 2020-02-10 12:25

I've found with SSRS, that deleting the Report's DataSource from a report, then re-creating it works to get rid of all cached data within the BIDS environment. However, I've never seen behaviour like this from a deployed report.

You could try deleting the Shared DataSource from the SSRS Server, then re-deploying it. Maybe it will cause a similar refresh. However, I wouldn't necessarily jump to an extreme like this if the deployed report is in a production environment.

查看更多
对你真心纯属浪费
4楼-- · 2020-02-10 12:28

Old post, but I still run into this, and found an article on how to put an option under external tools to make this easier.

  1. Go to Tools > External Tools...
  2. Add a new tool with the following settings:
    • Title: Clear Report Data Cache
    • Command: "%WinDir%\System32\cmd.exe"
    • Arguments: /C DEL /S /Q "$(SolutionDir)\*.rdl.data"
    • Check options: Use Output window & Close on exit

Now whenever you want to delete your report data cache, just go to Tools > Clear Report Data Cache

Full article here: http://jasonfaulkner.com/ClearDataCacheBIS.aspx

查看更多
登录 后发表回答