In this blog, we’ll discuss how to run / preview SSRS reports without cache in Local Machine in BIDS / SSDT.
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 .rdl.data file is present for the current report in your local system. If it not present, then BIDS will automatically create it.
- If yes, it checks and match whether the same set of parameter(s) are use to run the report,as it is having in .rdl.data file. Then run the report from .rdl.data file,i.e., the CACHE copy of the report
- If no, then overwrite the existing .rdl.data file with the new set of parameters and creates a new CACHE copy of the report.
We just need to navigate the Reports Solution Folder, go inside the folder and need to delete the files with extension .rdl.data
To make the job easier and automated of locating all the .rdl.data 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.
- Open the BIDS/Visual Studio.
- Click on Tools Menu => External Tools
- It’ll give a new window, to add External Tool
- Add the below details and click on ADD button.
- Title: Clear Report Cache-<Project Name>
“ To make it more clear to you which project is going to effect”
- Command: %WinDir%\System32\cmd.exe
- Arguments: /C DEL /S /Q “D:\ReportTest\ReportTest\*.rdl.data” “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”
- Check options: Use Output window & Close on exit
- 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 .rdl.data files in the Output window.
Please share your valuable comments.