views:

14

answers:

1

Using the Microsoft.Samples.ReportingServices.ReportViewer, I am showing multiple instances of the same SRS report on the same aspx page using IFrames (which is what the ReportViewer renders as.) Each instance has different parameters passed to it, so the output looks different on each instance of the report.

My issue is that in Internet Explorer, the same graphic is showing up for each report because IE is caching the image; the URL for each image representation of the report is the same URL, so IE assumes it should just show the same image over and over since it's all in on the same page (though separated by IFrames).

Firefox behaves correctly. Is there a way to prevent IE from caching the image? Here are solutions I cannot (do not have the power to) use:

  • Set the HTTP header of the image because it's on a remote SRS server.
  • Append a GUID in a query string to the end of the image so that IE thinks they're all different URLs.

I can't do the second because I specify the URL of the report (show in each IFrame) in this format:

http://SERVER_NAME/ReportServer?/path/ReportName&date=01-01-2000&rs:Command=Render&rc:toolbar=false

That page always renders the same markup, but overwrites the referenced image at each request.

To clarify, my issue is not that I am showing the images too quickly or that the server is getting confused by the same session. It is entirely Internet Explorer assuming that, i.e., "google.com/filename.jpg" is always the same image when on a single page multiple times.

Any suggestions would be helpful. (Please, for the love of everything holy, do not suggest crystal reports or a third party control.) (...Unless there's no alternative.)

A: 

If you have access to add HTTP headers to the server's reply, then add "Expires: -1" and/or "Pragma: no-cache" headers.

Remy Lebeau - TeamB