不支持的操作.由JRC引擎处理的文档不能在c++堆栈中打开



当我在Windows server 2003上部署oracle 10g数据库时。我使用sap水晶报告版本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 Version:4.0.30319;ASP。净版:4.0.30319.1

如果你有一个Web应用

您必须修改.rpt文件的属性:

  • 将构建动作更改为"内容";("嵌入式Resource"默认情况下)。
  • 将Copy to Output更改为"Copy always"("请勿复制";默认情况下)。

如果您不想更改每个文件的属性,有一种简单的方法可以默认构建操作用于非默认文件类型


如果你有一个网站

你必须设置标志"允许这个预编译的网站被上传"在"发布网站"中菜单


Web应用程序和Web站点

你可以用代替前面的步骤

  • 不使用发布选项发布报告,只是手动复制它们在发布文件夹

,你必须

  • 检查报告是否存在并且可以被应用程序访问(权限,文件路径,)

祝你好运!

您需要修改.rpt文件中的两个属性:

  1. Build Action默认设置为"Embedded Resource"。改成"Content"
  2. Copy to Output默认设置为"不复制"。把它改成"Copy always"。

重新构建、构建部署包和发布。完成了!

我得到了同样的错误信息,并尝试了谷歌搜索和谷歌搜索,但找到了解决方案。

首先,你必须检查你的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();                                   

在尝试以上所有解决方案后,我得到了最终解决方案,只是复制您的水晶报告文件夹(在那里您保存所有水晶报告到单个目录)直接到您的网站所在位置。在我的例子中,它是c:/inetpub/www/xyz这里xyz是发布文件夹

重新安装"Crystal report engine"到服务器,Build Action设置为"Content".

最新更新