Report Server URL Access Cache Problem

  • I am hoping someone here and help me out. I have a web application that takes input from a user and places the information in a database. At the end of the form is a button that allows the user to produce a report (SSRS) summarizing what was entered. The report button contains the following link:

    http://sqlrptdwt/ReportServer?/Information%20Technology/Legal%20IS/Litigation%20Closing%20Memo&rs:Command=Render&rs:Format=PDF&litigationID=1

    As you can see, the "Format=PDF" will allow us to export the report directly to a PDF when the user selects a button. What I've noticed, however, is that if the user enters information, clicks the button, re-enters more information (maybe they realized something was missing) and re-clicks the button...the report is cached and shows the data from the first button click.

    Does anyone know of a command I can include in the URL to remove any cached version and to only show the most recent --- or something that will make SSRS ALWAYS re-run the report?

  • try adding &rc:ClearSession =true

    or

    I was having report caching problems and cured them by updating the properties of the Reports directory in IIS. On the HTTP Headers tab I added a Custom HTTP Header of Cache-Control with a value of no-cache.

    or

    configure the caching of reports, it is under the execution tab in the report manager

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • Had the same problem the other day. Fiddler was showing requests to /ReportServer/Reserved.ReportViewerWebControl.axd return the HTTP header field:

    Cache-Control: private

    which allows the browser to cache the report data if it is not shared with other users. A terrible default for reports that change often! I couldn't find a setting to change this, and instead added

    Cache-Control: no-cache

    to the ReportServer as also suggested by Silverfox.

    Now the same request returns both headers:

    Cache-Control: no-cache

    Cache-Control: private

    According to HTTP/1.1 specifications, duplicate fields shouldn't be placed in a header unless the fields can normally be combined with a comma, as in "no-cache, private".

    Fortunately, the browser we are using (IE8) ignores the second field and so the problem is solved - local caching does not occur.

    It would be nice to remove the second header item, though.

  • Thank you both...

    It doesn't appear as if the "&rc:ClearSession=true" option worked - that was the type of fix I am looking for. I am reluctant to request a change to the IIS settings of the report server - we're in a rigid environment and I don't think configuration changes will be made for one report.

    I'll keep looking but I would appreciate any further assistance 🙂

  • I've found that adding Cache-Control: no-cache as I mentioned above causes an export problem: when the export to pdf, csv, etc control is used the browser queries the server for information the server no longer has stored. So caching is required!

    To solve the caching problem, I've programatically added &rs:ignore=XXXXXXXX to the report url, where XXXXXXXX is the current timestamp. The next time the report is requested, the url will be different because of this timestamp and the cached version will not be used.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply