Wednesday, March 7, 2012

Cache Problem

I am using Reporting Services with SQL Server 2000. The report is called in IE and rendered in PDF and displays correctly. However, the problem I have occurs when, during the same IE session, first I call the report, then change the values in the database, and call the report again with the same parameters. The second time, the values in the report remain the same as the first one.

Somehow, the second time I call the report, it is not generating a new one but using the one in Cache. If I close IE, reopen it and call the report then the new values are displayed.

In the Report Manager Properties/Execution, I chose to execute the report with the most recent data and not to put a temporary copy in chache.

Is there a way to force the report to ALWAYS get fresh copies?

Thanks a lot

Bob

There are two levels of caching. One is "execution caching" and you can configure this via the execution options tab in Report Manager. The other is "output caching." Output caching is when we cache the actual rendered output. You are hitting the "output cache" in this case, which is not configurable. Try hitting using "ctrl-f5" to force a refresh. It should cause us to clear your current session and you should see the new data the next time you request the report.

|||

Thanks for the info. It is true, as u wrote, that I am hitting the "output Cache"... But the problem is that the report will not be generated by me, but by the users of the Intranet I am developping.

Is there a way I can simulate the "ctrl-F5", or force a refresh, in the program?

|||

Have you tried passing in the name/value pair

rs:ClearSession=true

with your report URL? That should force a new query every time the report is viewed.

|||CTRL-F5 (through IE) and rs:ClearSession=true should give you identical results.|||

Also, the different users will get the data as it existed when they first rendered the report. The way to think about it is that when their session is created and the report is rendered, the data that generated that report is bound to their session. Subsequent "exports" of the different formats should contain the same data since it is for the same session. We will not reuse the output cache across sessions since they will each have their own snapshot (because you have the report set to execute live).

|||

John Gallardo - MSFT wrote:

CTRL-F5 (through IE) and rs:ClearSession=true should give you identical results.

Well, the OP wondered if he could "force" a refresh. rs:ClearSession will work here; although they are identical CTRL-F5 does not seem like a valid solution.

Side note - I've seen some MVP postings in Google Group results that contradict IE's refresh will work for this. I had a similar problem I had to search for help on. Example:

"Either close IE and reopen it or try clicking on the Report Manager refresh
button (IE refresh does not work). Rolling out a new version of a report is
a special case.

Closing IE and reopening it always works.

--
Bruce Loehle-Conger
MVP SQL Server Reporting Services "

Original thread:
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/acd8e041dd06dd86/8b17af12fee5b901?lnk=st&q=sql+reporting+services+session+caching&rnum=1&hl=en#8b17af12fee5b901

Just FYI. What, for my edification, is the difference in the thread's scenario and the OP?

|||Thx a lot, this was the solution!|||

Hello guys,

I have a problem with cashe.

When I get rport at the first time, it's OK

At the second - I get report without right part of header (it's truncated.)

Part of footer located at the same X position of footer isn't truncated.

All solutions mentioned above isn't useful.

What might it be?

Thanks

No comments:

Post a Comment