Run / Preview SSRS reports without Cache in Local Machine through BIDS / SSDT

In this blog, we’ll discuss how to run / preview SSRS reports without cache in Local Machine in BIDS / SSDT.

Problem Statement
We all have done work in SSRS reports. There are instances, when we made some changes in the procedures or the direct scripts or views we are using in the Report and want to see the Preview of the report in the BIDS, but the preview still showing the old data.

Reason behind this is BIDS/SSDT always run the reports first from the cache copy, which is the last run copy of the report run faster and save our time, if the report is run with same set of parameters.

When we click on the preview button for report in BIDS, first it checks whether the file is present for the current report in your local system. If it not present, then BIDS will automatically create it.

  1. If yes, it checks and match whether the same set of parameter(s) are use to run the report,as it is having in file. Then run the report from file,i.e., the CACHE copy of the report
  2. If no, then overwrite the existing file with the new set of parameters and creates a new CACHE copy of the report.

Solution A
We just need to navigate the Reports Solution Folder, go inside the folder and need to delete the files with extension

Solution B
To make the job easier and automated of locating all the files of any Report project and delete them all in one go, all you need to add a very simple configuration in the BIDS/SSDT, which I found in one the blog over the internet.

  1.  Open the BIDS/Visual Studio.
  2. Click on Tools Menu => External Tools
  3. It’ll give a new window, to add External Tool
  4. Add the below details and click on ADD button.
  5. Title: Clear Report Cache-<Project Name>
    “ To make it more clear to you which project is going to effect”   
  6. Command: %WinDir%\System32\cmd.exe
  7. Arguments: /C DEL /S /Q “D:\ReportTest\ReportTest\*”  “Here you need to declare the path of the Report project in your local machine. You need to be very careful while specifying the path with the proper extension. As it run a DOS command to delete those files. Once deleted, you cannot recover it. As it is like Shift+Del or Permanent Delete”
  8. Check options: Use Output window & Close on exit
  9. Click ‘OK’

The title you just specified in the window, now comes just above the External Tools option.

To clear all the cache copy of all the reports of that project, now all you need to do is click on Tools Menu => Click on the new option — Clear Report Cache-<Project Name>
On clicking the new option, you can see the at the bottom, about the deletion of all the files in the Output window.

Please share your valuable comments.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s