Groups | Blog | Home
all groups > sql server reporting services > november 2004 >

sql server reporting services : using SmartNavigation rendering a PDF w/ReportViewer



Steve K
11/4/2004 3:04:02 PM
I have two issues:

Issue#1
1. Using ReportViewer set to PDF format
2. Once the User Clicks a Button the code behind sets the path to the report
in the report viewer
3. this opens a prompt on the client machine to Open or Save the PDF
4. once the User then Clicks Open as the PDF is opening another Prompt also
asks to Save or Open the same Report (twice)

Issue#2 (related)
The first two times the User Clicks the Report button the Report Opens up in
a PDF reader and not in the browser (in the ReportViewer control) (on the
third click) open the same report up the third time and it shows up in the
browser until you close the browser and open another one then the above cycle
starts over

what I want to do is Open the report up in a PDF reader everytime. (once per
click).

if I turn off SmartNavigation the problem where the same report opens twice
goes away.

Thanks
Steve
Scott Allen
11/4/2004 9:35:02 PM
Hi Steve:

Unfortunately, SmartNavigation has a history of causing
idiosyncracies in applications. I keep it out of applications these
days. Using google you can find a long list of strange SmartNav
induced problems.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 4 Nov 2004 15:04:02 -0800, "Steve K"
[quoted text, click to view]
Steve K
11/5/2004 6:30:03 AM
Scott,

We use Smartnavigation because we have a very complex application that needs
to use postback at various times, when the page redraws we don't want the
user to have too scroll bak to thier position.

do you know of an alternative, short of, "don't use post backs" or "do
everything in Web services".

also any thoughts on why the PDF renders in the browser after the third
viewing?

Thanks
Steve

[quoted text, click to view]
Steve K
11/5/2004 11:32:03 AM
Thanks for your thoughts Scott

I did figure out that if I send "&rs:ClearSession=true" at the end of the
URL request
I no longer get the report embedded after the third attempt it always opens
up in
a PDF reader, so it's not perfect but at least it's consistent.

Thanks
Steve

[quoted text, click to view]
Scott Allen
11/5/2004 11:43:44 AM
Hi Steve:

I know a few people have written HttpModules and JavaScript libraries
to do "smart scrolling", which keep the focus after a posttback, but I
have not used any of them so I can't comment on the quality. I'm sure
if you google for terms like smart scroll, postback, SmartNavigation,
you'll come across a few.

I'm not sure why you are seeing the multiple prompts. What I might try
to do instead of using the report viewer, which creates an IFRAME that
might be complicating things, is to go directly to the report with URL
access and ask to render in PDF.

Something like:
http://machine/reportserver?/report&rs:Command=Render&rs:Format=PDF

--
Scott
http://www.OdeToCode.com/

On Fri, 5 Nov 2004 06:30:03 -0800, "Steve K"
[quoted text, click to view]
AddThis Social Bookmark Button