WiseOwl Training - Established 1992 Wise Owl Training

Established May 1992
30 years in business
Wise Owl Training
30 years in business
See 520 reviews for our classroom and online training
Prevent Reporting Services from caching data
By default SSRS will create files with extension .rdl.data to cache data. This blog gives two and a half ways to ensure you're always seeing the latest data in a report.

Posted by Andy Brown on 01 October 2012

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Preventing Data Caching when Developing SSRS Reports

How can you be sure that you're seeing the latest copy of any data?  The answer: disable report caching.  This blog explains what the problem is, then gives two-and-a-half possible solutions.

The Problem: Data is Cached

So - you run a report listing out various films from a Movies database, and get:

Two records from films report

The first couple of films from our report. 

You decide that Jurassic Park was too long (that scary bit with the T. Rex should be cut), and make a change to your data:

Changing film length to 100 minutes

The owl's cut: 1 hour 40 minutes should do it.


You then rerun the report, and nothing has changed:

Film still 127 minutes long

The film length hasn't changed in the report, even though the underlying data has.


This problem comes about because SSRS is trying to speed up your reports.  Whenever you run a report using exactly the same combination of parameters (where there are any) as for the previous time you ran the report, you'll see cached data.

Solution 1 - Just Refresh the Screen

A simple solution is just to refresh the data for your report:

Refreshing report

Click on the icon shown to see the latest data for your report.


Solution 2 - Delete the Cached Data 

A second solution is to delete the cached data file:

The data cache file

Find the file with extension .rdl.data in your project in Windows Explorer and delete it - you'll then get the latest data when you run your report.


This isn't a great solution: you have to keep doing it again (as the file shown is recreated whenever you run the report); there's always the risk you'll delete the report itself by mistake; and you have to delete the report through Windows Explorer, as it doesn't show up in Solution Explorer in Visual Studio.

Solution 3 - Change your SSRS Configuration 

You can - in theory - prevent report caching by changing your configuration settings - but first you have to find them!  The folder path will be something like:

C:\Program Files\Microsoft Visual Studio 10.0\ Common7\IDE\PrivateAssemblies

Once you've found this folder, you can double-click on the file called RSReportDesigner.config to edit it: 

The SSRS configuration settings file

Double-click on this file to change your settings.

You can then change the CacheDataForPreview option to false:

The CacheDataForPreview option

Change the value of this option from true to false to disable data caching.


However, this change doesn't seem to have any effect in SSRS 2008 (although I suspect it did work in earlier versions), and Microsoft seem to agree.

If anyone can throw any more light on this, please do so via the comments at the bottom of this web page. 

This blog has 0 threads Add post