Saturday, April 11, 2009

Export Crystal Report to Excel Sheet

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

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

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

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home