IN SSRS, is there a way to disable the rdl.data file creation
In SSRS, I noticed that the rdl.data cache开发者_StackOverflow中文版 files are being stored on my dev machine. Are these files also stored on the Reports Server when reports are run? If so, is there a way to avoid creating those files on the server?
rdl.data files aren't created on the server - they're purely to speed up report execution time during development when you repeatedly run the report with the same parameters whilst tweaking the layout.
As a side point, I believe it's true to say that it's possible to configure the SSRS service to cache results for reuse.
I don't know the details of the caching mechanism that the service uses; it might use a file-based mechanism like rdl.data, or it might store the results in one of the ReportingServices databases.
Perhaps someone more knowledgable about SSRS can confirm the details of the mechanism.
In development, you can turn the caching off (and eliminate the *.rdl.data files) by editing the designer config file.
For SQL Server 2008 SSRS, the default location would be:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\RSReportDesigner.config
Change CacheDataForPreview to “false”
Source Link http://blog.summitcloud.com/2010/05/disable-reporting-services-data-cache-in-development/
I'm not convinced that zomf's answer works (and neither are Microsoft). It sounds good in theory, but doesn't seem to work in practice.
I think the easiest thing to do is to live with these files. If you're bothered, you could always set the AutoRefresh property of every report that you created to 1 second (although the irritating flashing effect and load on your server might make this option unfeasible).
Otherwise, just click on the REFRESH button when previewing your report.
One other option might be to create dummy parameters for a report, with a randomly generated value each time you run it. Since SSRS only shows cached data when the combination of parameters entered is identical to the previous time you ran the report, this might solve the problem. I haven't tested it in practice, however.
PowerShell to the rescue, just hide it - add a PowerShell project to your Reports solution and set it as the start-up project in your build configuration:
$path = "../*.rdl.data"
$rdlDataFiles = Get-ChildItem -Recurse -Force -Path "$path";
Write-Output "$path"
$rdlDataFiles | ForEach-Object {
Write-Output "Hiding *.rdl.data file $_"
$_.Attributes = $_.Attributes -bor (([System.IO.FileAttributes]::Hidden))
# Next line isn't required per say, but just a guard.
$_.Attributes = $_.Attributes -bor (-bnot([System.IO.FileAttributes]::ReadOnly))
}
精彩评论