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:01

In development mode for SSRS, I usually delete the report_name.rdl.DATA File. That is were the data is kept from the last run.

It took a few runs to figure out that this was my issue with changing the source data and the report looking like the last run.

Edit: Beware not to delete your .rdl report file (it's the "report.rdl.data" file that you want to delete in order to refresh the resultset).

查看更多
乱世女痞
3楼-- · 2020-02-10 12:05

None of these options worked for me - then I ticked "Use single transaction when processing the queries" in Data Source Properties and the preview started running with the latest data.

查看更多
家丑人穷心不美
4楼-- · 2020-02-10 12:13

I found that when using VS in SSRS 2010 that the Preview mode would only show the old data. If I went to the dataset query and hit refresh then new data would come down OK and then the Preview would show the new data. This was annoying but reading about it I understood that the deployed report would refresh itself OK. I couldn't prove this theory as I do not have access to view my deployed reports which is even more annoying. Anyway I took a few hints from various posts and changed the AutoRefresh property in Report properties from 0 to 1. Then when I went to Preview mode the report updated OK but kept updating every 1 second. Now I get how that property works and set it to 1000000. This means that it refreshes once when you first go to Preview and then it would do it again in 1000000 seconds by which time I am out of preview mode and happily building the report some more. I don't really know how this would effect a deployed report but much the same I would think. Maybe someone else who has access to their deployed reports can advise.

查看更多
劳资没心,怎么记你
5楼-- · 2020-02-10 12:15

May be this would help for someone who seeks old data display even report buider displays current data.

I am also facing such issues in existing live reports. I had updated data in DB side. But the change is not worked. I refreshed several times. Still showing old data. Later I found that I clicked the 'View Report history' for the report [this option will display if you hover in the report name, and clicking the Downarrrow]. In Left side of the Report history page, I went to 'Processing Option', there I could see that two radio options available.

  1. Always run this report with the most recent data
  2. Render this report from a report snapshot

unfortunately, my report has Point2 selection. and it is being scheduled at every 7 am on daily basis. So, after 7 am, if we do any change, we could not see immediately. we have to wait for next day snapshot. BUt, we can change this by selecting Point1 which will bring you most recent data.

Hope this might help someone who is maintaning SSRS reports.

Regards, Viswa V.

查看更多
可以哭但决不认输i
6楼-- · 2020-02-10 12:15

In Visual Studio 2017, click on the Preview tab for the report in question.

On the icon tool bar there is a refresh icon that will pull the latest data from your database when you click it:

enter image description here

查看更多
放荡不羁爱自由
7楼-- · 2020-02-10 12:15

Many people forget to do this, always ensure that your .rds files are up to date. In SSRS, re-Build and re-Deploy “Shared Data Sources” and “Shared Datasets” together with your report(s).

  1. Select “Shared Data Sources” and “Shared Datasets” (.rds) files.
  2. Right mouse click, “Build”.
  3. Right mouse click, “Deploy”.

Now re-run report(s) from the host.

查看更多
登录 后发表回答