Thursday, March 8, 2012
Caching of reports
I am using the report service to generate all of my reports. The reports are
generated as pdf and then printed.
The following situaton:
- The user fills out a windows form and previews the report. On the preview
he recognised that there is a mistake in the text he filled out and closes
the preview.
- The user corrects the mistake and previews the report again (same report,
same user, same parameters)
- In the preview the report has not changed !!!!
I have set all the reports not to cache (store no temporary copies of the
report).
When I use SQL Profiler to analyze whats going on on the sql server the
following messages appear:
"exec GetChunkPointerAndLength @.SnapshotDataID = 'A8A41F0F-2C70-4D7D-BE21-DD3BD5F0E921', @.IsPermanentSnapshot = 1, @.ChunkName
= N'CompiledDefinition', @.ChunkType = 0"
and after that a few calls of:
"exec ReadChunkPortion"
Definitly the stored procedure which provides the values for the report is
not called.
In the scenario shown above the stored procedure must be called everytime
the report is rendered.
How can I configure report services to do so?
Thanks.I am calling the "FlushCache" method before rendering the pdf-file which does
not change the behavior listed below.
"Thomas Vierlinger" schrieb:
> Hi!
> I am using the report service to generate all of my reports. The reports are
> generated as pdf and then printed.
> The following situaton:
> - The user fills out a windows form and previews the report. On the preview
> he recognised that there is a mistake in the text he filled out and closes
> the preview.
> - The user corrects the mistake and previews the report again (same report,
> same user, same parameters)
> - In the preview the report has not changed !!!!
>
> I have set all the reports not to cache (store no temporary copies of the
> report).
> When I use SQL Profiler to analyze whats going on on the sql server the
> following messages appear:
> "exec GetChunkPointerAndLength @.SnapshotDataID => 'A8A41F0F-2C70-4D7D-BE21-DD3BD5F0E921', @.IsPermanentSnapshot = 1, @.ChunkName
> = N'CompiledDefinition', @.ChunkType = 0"
> and after that a few calls of:
> "exec ReadChunkPortion"
> Definitly the stored procedure which provides the values for the report is
> not called.
> In the scenario shown above the stored procedure must be called everytime
> the report is rendered.
> How can I configure report services to do so?
> Thanks.
>
>|||Try passing the following parameter...
to the report...
rs:ClearSession=true
"Thomas Vierlinger" wrote:
> I am calling the "FlushCache" method before rendering the pdf-file which does
> not change the behavior listed below.
> "Thomas Vierlinger" schrieb:
> > Hi!
> >
> > I am using the report service to generate all of my reports. The reports are
> > generated as pdf and then printed.
> >
> > The following situaton:
> > - The user fills out a windows form and previews the report. On the preview
> > he recognised that there is a mistake in the text he filled out and closes
> > the preview.
> > - The user corrects the mistake and previews the report again (same report,
> > same user, same parameters)
> > - In the preview the report has not changed !!!!
> >
> >
> > I have set all the reports not to cache (store no temporary copies of the
> > report).
> > When I use SQL Profiler to analyze whats going on on the sql server the
> > following messages appear:
> >
> > "exec GetChunkPointerAndLength @.SnapshotDataID => > 'A8A41F0F-2C70-4D7D-BE21-DD3BD5F0E921', @.IsPermanentSnapshot = 1, @.ChunkName
> > = N'CompiledDefinition', @.ChunkType = 0"
> >
> > and after that a few calls of:
> >
> > "exec ReadChunkPortion"
> >
> > Definitly the stored procedure which provides the values for the report is
> > not called.
> > In the scenario shown above the stored procedure must be called everytime
> > the report is rendered.
> >
> > How can I configure report services to do so?
> >
> > Thanks.
> >
> >
> >|||As described below I am not rendering with url access.
I am rendering pdf files direkt from C# code using the webservice render
method (ReportingService.Render).
"CCP" schrieb:
> Try passing the following parameter...
> to the report...
> rs:ClearSession=true
>
> "Thomas Vierlinger" wrote:
> > I am calling the "FlushCache" method before rendering the pdf-file which does
> > not change the behavior listed below.
> >
> > "Thomas Vierlinger" schrieb:
> >
> > > Hi!
> > >
> > > I am using the report service to generate all of my reports. The reports are
> > > generated as pdf and then printed.
> > >
> > > The following situaton:
> > > - The user fills out a windows form and previews the report. On the preview
> > > he recognised that there is a mistake in the text he filled out and closes
> > > the preview.
> > > - The user corrects the mistake and previews the report again (same report,
> > > same user, same parameters)
> > > - In the preview the report has not changed !!!!
> > >
> > >
> > > I have set all the reports not to cache (store no temporary copies of the
> > > report).
> > > When I use SQL Profiler to analyze whats going on on the sql server the
> > > following messages appear:
> > >
> > > "exec GetChunkPointerAndLength @.SnapshotDataID => > > 'A8A41F0F-2C70-4D7D-BE21-DD3BD5F0E921', @.IsPermanentSnapshot = 1, @.ChunkName
> > > = N'CompiledDefinition', @.ChunkType = 0"
> > >
> > > and after that a few calls of:
> > >
> > > "exec ReadChunkPortion"
> > >
> > > Definitly the stored procedure which provides the values for the report is
> > > not called.
> > > In the scenario shown above the stored procedure must be called everytime
> > > the report is rendered.
> > >
> > > How can I configure report services to do so?
> > >
> > > Thanks.
> > >
> > >
> > >|||i think u can set that value as a parameter in your report...
"Thomas Vierlinger" wrote:
> As described below I am not rendering with url access.
> I am rendering pdf files direkt from C# code using the webservice render
> method (ReportingService.Render).
>
> "CCP" schrieb:
> > Try passing the following parameter...
> > to the report...
> > rs:ClearSession=true
> >
> >
> > "Thomas Vierlinger" wrote:
> >
> > > I am calling the "FlushCache" method before rendering the pdf-file which does
> > > not change the behavior listed below.
> > >
> > > "Thomas Vierlinger" schrieb:
> > >
> > > > Hi!
> > > >
> > > > I am using the report service to generate all of my reports. The reports are
> > > > generated as pdf and then printed.
> > > >
> > > > The following situaton:
> > > > - The user fills out a windows form and previews the report. On the preview
> > > > he recognised that there is a mistake in the text he filled out and closes
> > > > the preview.
> > > > - The user corrects the mistake and previews the report again (same report,
> > > > same user, same parameters)
> > > > - In the preview the report has not changed !!!!
> > > >
> > > >
> > > > I have set all the reports not to cache (store no temporary copies of the
> > > > report).
> > > > When I use SQL Profiler to analyze whats going on on the sql server the
> > > > following messages appear:
> > > >
> > > > "exec GetChunkPointerAndLength @.SnapshotDataID => > > > 'A8A41F0F-2C70-4D7D-BE21-DD3BD5F0E921', @.IsPermanentSnapshot = 1, @.ChunkName
> > > > = N'CompiledDefinition', @.ChunkType = 0"
> > > >
> > > > and after that a few calls of:
> > > >
> > > > "exec ReadChunkPortion"
> > > >
> > > > Definitly the stored procedure which provides the values for the report is
> > > > not called.
> > > > In the scenario shown above the stored procedure must be called everytime
> > > > the report is rendered.
> > > >
> > > > How can I configure report services to do so?
> > > >
> > > > Thanks.
> > > >
> > > >
> > > >|||and how should that work?
bol says it is an url parameter
"CCP" schrieb:
> i think u can set that value as a parameter in your report...
> "Thomas Vierlinger" wrote:
> > As described below I am not rendering with url access.
> >
> > I am rendering pdf files direkt from C# code using the webservice render
> > method (ReportingService.Render).
> >
> >
> > "CCP" schrieb:
> >
> > > Try passing the following parameter...
> > > to the report...
> > > rs:ClearSession=true
> > >
> > >
> > > "Thomas Vierlinger" wrote:
> > >
> > > > I am calling the "FlushCache" method before rendering the pdf-file which does
> > > > not change the behavior listed below.
> > > >
> > > > "Thomas Vierlinger" schrieb:
> > > >
> > > > > Hi!
> > > > >
> > > > > I am using the report service to generate all of my reports. The reports are
> > > > > generated as pdf and then printed.
> > > > >
> > > > > The following situaton:
> > > > > - The user fills out a windows form and previews the report. On the preview
> > > > > he recognised that there is a mistake in the text he filled out and closes
> > > > > the preview.
> > > > > - The user corrects the mistake and previews the report again (same report,
> > > > > same user, same parameters)
> > > > > - In the preview the report has not changed !!!!
> > > > >
> > > > >
> > > > > I have set all the reports not to cache (store no temporary copies of the
> > > > > report).
> > > > > When I use SQL Profiler to analyze whats going on on the sql server the
> > > > > following messages appear:
> > > > >
> > > > > "exec GetChunkPointerAndLength @.SnapshotDataID => > > > > 'A8A41F0F-2C70-4D7D-BE21-DD3BD5F0E921', @.IsPermanentSnapshot = 1, @.ChunkName
> > > > > = N'CompiledDefinition', @.ChunkType = 0"
> > > > >
> > > > > and after that a few calls of:
> > > > >
> > > > > "exec ReadChunkPortion"
> > > > >
> > > > > Definitly the stored procedure which provides the values for the report is
> > > > > not called.
> > > > > In the scenario shown above the stored procedure must be called everytime
> > > > > the report is rendered.
> > > > >
> > > > > How can I configure report services to do so?
> > > > >
> > > > > Thanks.
> > > > >
> > > > >
> > > > >
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
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
Thursday, February 16, 2012
Bypass PDF open/save prompt
but I get the dreaded Open/Save prompt. Is there any way to bypass
this and just open the PDF file? Also, is it even possible to simply
print the report with the user's default printer when a button is
clicked?
I am using SSRS 2005 and SQL 2005 June CTP with Visual Studio 2005 Beta
2. My application is ASP.NET with VB
Thanks in advance.RS SP2 has print support from the report viewer. I think that the open/save
prompt is a security feature of the web browser. If you want to get the PDF
without the prompt, you can use the Web Service' Render method
--
Floyd
<chrishalldba@.yahoo.com> wrote in message
news:1123779652.686768.275080@.g49g2000cwa.googlegroups.com...
>I have figured out how to call a report and pass parameters via a URL,
> but I get the dreaded Open/Save prompt. Is there any way to bypass
> this and just open the PDF file? Also, is it even possible to simply
> print the report with the user's default printer when a button is
> clicked?
> I am using SSRS 2005 and SQL 2005 June CTP with Visual Studio 2005 Beta
> 2. My application is ASP.NET with VB
> Thanks in advance.
>|||Thanks for the fast reply! Do you know if I could use this render
method with SSRS 2005? I'm using the June CTP if that makes a
difference. Do you have any code examples of this?
Chris|||From what I've seen, SP2's print is a button on the report viewer web page.
When that button is clicked, an activex control is downloaded that does the
printing. I don't know what happens behind the scenes.
--
Floyd
"Chris" <chrishalldba@.yahoo.com> wrote in message
news:1123780980.603308.323720@.o13g2000cwo.googlegroups.com...
> Thanks for the fast reply! Do you know if I could use this render
> method with SSRS 2005? I'm using the June CTP if that makes a
> difference. Do you have any code examples of this?
> Chris
>|||You can compile and install the Server Side printing example that comes with
SQL 2005. A user can then subscribe to a report and have it printed to the
named printer.. THe printer must be installed on the server...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
<chrishalldba@.yahoo.com> wrote in message
news:1123779652.686768.275080@.g49g2000cwa.googlegroups.com...
>I have figured out how to call a report and pass parameters via a URL,
> but I get the dreaded Open/Save prompt. Is there any way to bypass
> this and just open the PDF file? Also, is it even possible to simply
> print the report with the user's default printer when a button is
> clicked?
> I am using SSRS 2005 and SQL 2005 June CTP with Visual Studio 2005 Beta
> 2. My application is ASP.NET with VB
> Thanks in advance.
>