direct export of a crystal report

F

Fh

Hello,
I'm using the following code to send the content of a report directly in a
aspx page.

this code is working fine,
but the pb is that it doesn't fill the page with the document.
it displays automatically the 'open or save' popup...
I wish to open it directly in the IE window without asking anything?
how can I do so?

Thanks for your help

----------------code---------------------
docReport.ExportOptions.ExportFormatType =
ExportFormatType.WordForWindows;
MemoryStream m_stream = new MemoryStream();
m_stream =
(MemoryStream)docReport.ExportToStream(
CrystalDecisions.Shared.ExportFormatType.WordForWindows);
Response.Clear();
Response.AddHeader("content-disposition",
"attachment;filename=FileName.doc");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.word";
Response.BinaryWrite(m_stream.ToArray());
Response.End();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top