Solved

Opening SQL Server 2005 report in PDF format in new window.

Posted on 2007-04-09
3
226 Views
Last Modified: 2010-03-19
Hi,
I am calling SQL Server 2005 report from my asp.net application using web services.Everything looks fine except for that report is being rendered in same window.I want this pdf report to open in a different window.Can any one tell me what lines of code should i add it get this done.
Below are the last few lines of my code....and can any one tell me how do i get the response in a pop up or seperate window....

Response.ClearContent();
Response.AppendHeader("content-length",result.Length.ToString());
Response.ContentType = "application/pdf";
Response.BinaryWrite(result);
Response.Flush();
Response.Close();
0
Comment
Question by:aspnetdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 18876662
You have to have the request ask that the response be delivered to a new window, not the same window from which the request comes.
0
 

Author Comment

by:aspnetdev
ID: 18877924
can you be more elaborate>
0
 
LVL 23

Accepted Solution

by:
Christopher Kile earned 125 total points
ID: 18878694
It depends on how you open the request.  If you're clicking an anchor link, add "javascript:  return window.open('" to the front of the url, then add "', '_blank';" to the end of the url.  This changes the url link to a Javascript call that opens the url in a new window.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question