Why is my SSRS report showing old data?
Asked Answered
A

10

30

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.

Acidify answered 13/8, 2013 at 13:12 Comment(1)
IE will cache data too. Try alt-refresh or a different browser.Duality
H
41

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).

Haun answered 27/8, 2013 at 15:36 Comment(4)
you mean report.rdl.DATA file or the .rdl file ?Monaghan
Steam, Try deleting the report.rdl.DATA file. The next run will use whatever is in the report.rdl.DATA file. Sometimes exiting out of the SSRS application will help too.Haun
Thanks. But I never found any .DATA files anywhere in the project folder. Is this normal ?Monaghan
The data files are stored in the same folder with your report definitions.Haun
C
30

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

Cleanly answered 6/6, 2016 at 20:47 Comment(2)
I get way too much rep for this. Jason Faulkner is the guy who deserves it.Cleanly
The Faulkner link is a 404 as of now. Per @Mike just use Refresh button in the Preview tab.Lactescent
B
11

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

Blakney answered 26/6, 2019 at 19:41 Comment(1)
This is the answer. An official button instead of having to add a tool option.Lactescent
T
6

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.

Treadway answered 18/3, 2016 at 16:53 Comment(0)
A
3

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.

Athos answered 9/12, 2014 at 6:42 Comment(1)
Although I still couldn't figure out what causes this issue but your approach did the trick while I look out for a valid reason why this is happening on the deployed reports. Thanks mate!Impersonalize
K
2

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.

Koloski answered 13/8, 2013 at 21:12 Comment(0)
G
2

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.

Galilee answered 31/3, 2016 at 6:28 Comment(0)
S
1

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.

Scurry answered 13/8, 2013 at 13:33 Comment(1)
Very weird indeed -- I've tried all of the above but none had any effect.Acidify
M
1

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.

Mark answered 9/12, 2014 at 16:9 Comment(0)
S
0

I just had this issue with a report which I had manually uploaded to the report server, whose XML clearly had the correct data source and dataset info. The setup of the project is with shared data source and shared datasets. I resolved it by adjusting the report's data source and dataset settings on the report server. Click the ellipsis (...) next to the report, choose Manage, and select Data source and Shared Datasets on the left panel, respectively, to adjust. For some reason it just didn't "take" the data updates on the manual upload.

Shipper answered 24/8, 2021 at 19:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.