当我在后端使用oracle 10g数据库在windows server 2003上部署我的asp.net网站时。我正在使用sap crystal report version 13.0.2000.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.
来源错误:
在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。
堆栈追踪:
[COMException (0x80041811): Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +95
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +270
[CrystalReportsException: Load report failed.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +333
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +877
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +84
WEBPAGES_srccustomerbill2.setdatasource() +2270
WEBPAGES_srccustomerbill2.Page_Load(Object sender, EventArgs e) +233
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.1
答案 0 :(得分:36)
您必须修改.rpt 文件的属性:
如果您不想更改每个文件的属性,可以轻松地 default build action for non-default file-types 。
您必须在“发布网站”菜单中标记“允许此预编译网站可更新”
你可以而不是做前面的步骤
你必须
答案 1 :(得分:5)
您需要修改.rpt文件中的两个属性:
重建,构建部署包和发布。完成!
答案 2 :(得分:3)
我收到了同样的错误消息,并尝试了谷歌搜索和谷歌搜索,但找到了解决方案。
首先,您必须检查ReportPath
是否正确。
如果您使用的是C#,则此代码可能有所帮助:
//declare new report
ReportDocument rpt = new ReportDocument();
//load your report
rpt.Load(Server.MapPath("crMembers.rpt"));
//set your datasource
rpt.Database.Tables[0].SetDataSource(m.GetReportSource());
//set your report for the viewer
crviewer.ReportSource = rpt;
//refresh the viewer
crviewer.RefreshReport();
答案 3 :(得分:-1)
尝试以上所有解决方案后,我得到的最终解决方案是将Crystal Report文件夹(将所有水晶报告保存到单个目录中)直接复制到您托管网站的位置。在我的例子中它是c:/ inetpub / www / xyz这里xyz是发布文件夹。
答案 4 :(得分:-2)
将“Crystal报表引擎”重新安装到服务器,将“构建操作”设置为“内容”..