Click here to Skip to main content
15,937,006 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,

I am using visual studio 2012 and crystal report 13.5. I am using following coding for loading report to crystalreportviewer

XML
ReportDocument crystalReport = new ReportDocument();
crystalReport.Load(Server.MapPath("Report_SalesOrder.rpt"));
Report dsCustomers = cs.GetData("sp_Rpt_SalesOrderDetails", new List<string> { "@SOID" }, new List<string> { ddlsalesorderid.SelectedItem.Text }, "DT_Sales_SO");
crystalReport.SetDataSource(dsCustomers);
CrystalReportViewer1.ReportSource = crystalReport;



That above mention coding working fine before publish.

After publish that project in my local IIS it showing following error


Error Message:- System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack. at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() --- End of inner exception stack trace --- at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) at ERPUSA.Forms.Reports.Rpt_SalesOrderByCustomer.ddlsalesordercustname_SelectedIndexChanged(Object sender, EventArgs e) in e:\Projects\ERPUSA\ERPUSA\Forms\Reports\Rpt_SalesOrderByCustomer.aspx.cs:line 58 at ERPUSA.Forms.Reports.Rpt_SalesOrderByCustomer.Page_Load(Object sender, EventArgs e) in e:\Projects\ERPUSA\ERPUSA\Forms\Reports\Rpt_SalesOrderByCustomer.aspx.cs:line 30 at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.forms_reports_rpt_salesorderbycustomer_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\erpusa\1102196d\ed594433\App_Web_faa2lcij.6.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Please help me to solve this issue

Thanks

BALA
Posted
Updated 4-Apr-23 2:13am
v2

1 solution

Solution:Try to copy the crystal Report folder in Inetpub folder to your application folder and make sure that admin permissions were give to it.
 
Share this answer
 

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