18 สิงหาคม 2552 19:14
Is it possible to cache and reuse the cached versions of TogglePlus.gif and ToggleMinus.gif in ReportViewer? I noticed that the URLs for these images change each time my report is rendered. The following is an example of the image URL that is cached:
All other images for areas such as the toolbar seem to have static URLs that allow for caching successfully. Should the URLs for the toggle images be static as well, or is it definitely PEBCAK? Thanks in advance for any advice.
22 สิงหาคม 2552 20:20Furthermore, the reason behind the dynamic behavior of the URLs has to do with the ReportID/ControlID changing. I have considered using a Url.RewritePath() in Global.asax.cs during the beginning of the request, but this is probably a road to disaster. If anybody can offer some advice, I would be truly grateful.
23 สิงหาคม 2552 6:49ผู้ดูแลWhile the images will always be the same, the report viewer doesn't really know this. To the client, the toggle images are treated no differently than other images (such as charts) in the report. That's why they are associated with the specific instance and session ID of the report you are viewing.
Due to some architectural changes made for SQL Server 2008, it may be possible to make the distinction between these "constant" images and the report specific images. I will look into this performance improvement for the next release of the report viewer control.
27 สิงหาคม 2552 20:24What we are finding is that there is a ton of data in session state (apparently this is a function of how much data is in the report?), and these hits to retrieve the + and - graphics require the loading of session state. So the extra server trips for these graphics are more expensive than you might think.
31 สิงหาคม 2552 5:19ผู้ดูแลI agree. I have opened a bug to reuse the toggle and sort images across reports.
- ทำเครื่องหมายเป็นคำตอบโดย Joe Duero 18 พฤศจิกายน 2552 22:06
6 มีนาคม 2555 18:51
So, what is the solution?