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

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

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
aspnetdev
Asked:
aspnetdev
  • 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.
0
 
aspnetdevAuthor Commented:
can you be more elaborate>
0
 
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.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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