Click here to Skip to main content
15,915,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
objReportDocument = new ReportDocument();
objIReportDocument = ReportFactory.InitiateReportDocumentCR();
objReportDocument = (ReportDocument)objIReportDocument.GetReportDocument(objReportCallingViewData.ReportInformation.ReportFileName, vParamArrayList, objReportCallingViewData.ReportInformation.ReoprtPath, vFormulaList)

System.IO.MemoryStream vMS;
vMS = (System.IO.MemoryStream)objReportDocument.ExportToStream(ExportFormatType.PortableDocFormat);
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.ContentType = "application/Pdf";
Response.BinaryWrite(vMS.ToArray());
Response.Flush();
Response.End();
vMS.Dispose();

this code was working fine in visual studio 2008 but not working in visual studio 2010 and show an error message 'Output Stream not available when a custom TextWriter is used' please anybody can help me.
Posted
Updated 19-Dec-12 17:06pm
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900