Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
Source Error:
|
Source File: d:\Documents\Visual Studio 2015\WebSites\SCH\School\Search.aspx.vb Line: 277
Look my below code.
Dim oStream As New MemoryStream ' // using System.IO
With CrystalReportSource1
.Report.FileName = "SchoolInformation.rpt"
.ReportDocument.Load(Server.MapPath("SchoolInformation.rpt"), OpenReportMethod.OpenReportByDefault)
.ReportDocument.SetParameterValue(PARAMETER_School_ID, txtSchoolID.Text)
.ReportDocument.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
.ReportDocument.ExportOptions.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.NoDestination
oStream = .ReportDocument.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Response.BinaryWrite(oStream.ToArray())
Response.End()
End With
Its perfect.
I have download Crystal report for visual studio 2015. But i dont know why is not working.