470,836 Members | 1,818 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,836 developers. It's quick & easy.

How to Open report exported file in another window

I'm using this code to export the crystal report file into pdf format and
stream the file to the browser:

ReportDocument oRpt = new ReportDocument();
Stream St = oRpt.ExportToStream(ExportFormatType.PortableDocFo rmat);

Response.ContentType = "Application/PDF";

Byte[] buffer = new Byte[St.Length];
St.Read(buffer, 0, (int) St.Length);

Everything works fine, but the pdf file is opened in the same browser
Is it possible to open the pdf file in another window, without exporting the
file to disk first ?

// Ex: This also works (the pdf file is opened in another browser window),
but the file is exported to disk first.
oRpt.ExportToDisk(ExportFormatType.PortableDocForm at, LongFileName);
Response.Write("<script>window.open('"+Request.App licationPath+"/Files/"+Fil

Nov 18 '05 #1
0 1217

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jason Huang | last post: by
6 posts views Thread by Shamin | last post: by
2 posts views Thread by Prasanta | last post: by
4 posts views Thread by timmg | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.