ReportDocument rpt1 = new ReportDocument(); rpt1 = Session["ReportData"] as ReportDocument; oStream = (MemoryStream) rpt1.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Excel); Response.Clear(); Response.Buffer = true; Response.ContentType = "application/vnd.ms-excel"; Response.AppendHeader("Content-disposition", "attachment; filename=Excel.xls"); //Response.BinaryWrite(this.oStream.ToArray()); Response.BinaryWrite(oStream.ToArray()); Response.End();// Also tried with this. But didn't see any change in behaviour. HttpContext.Current.ApplicationInstance.CompleteRequest();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)