• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

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

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.ContentType = "application/pdf";
  • 2
1 Solution
Christopher KileCommented:
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.
aspnetdevAuthor Commented:
can you be more elaborate>
Christopher KileCommented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now