Click here to Skip to main content
12,697,311 members (28,133 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
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 18-Dec-12 18:17pm
Updated 19-Dec-12 18:06pm
v2

1 solution

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 20 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100