Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3668

Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.

$
0
0

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:

Line 275:        With CrystalReportSource1

Line 276:            .Report.FileName = "SchoolInformation.rpt"

Line 277: .ReportDocument.Load(Server.MapPath("SchoolInformation.rpt"), OpenReportMethod.OpenReportByDefault)

Line 278:            .ReportDocument.SetParameterValue(PARAMETER_School_ID, txtSchoolID.Text)

Line 279:            .ReportDocument.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat


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.


Viewing all articles
Browse latest Browse all 3668

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>