Saturday, April 11, 2009

Way to convert Crystal Report to Word without crystalreportviewer

The Given Coding is directly used to export the crystal report without showing crystalreportviewer


MemoryStream oStream; // using System.IO
oStream = (MemoryStream)
rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocument);
Response.Clear();
Response.Buffer = true;
Response.ContentType = "appliaction/ms-word";

Response.BinaryWrite(oStream.ToArray());
Response.End()

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home