C++ 不支持的操作。JRC引擎处理的文档无法在C++栈中打开

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8654154/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 18:56:32  来源:igfitidea点击:

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

asp.netc++crystal-reportssap

提问by Rupesh Deshmukh

when i deploy my asp.net website on windows server 2003 with oracle 10g database in backend.I am using sap crystal report version 13.0.2000.0 It gives error as

当我在后端使用 oracle 10g 数据库的 windows server 2003 上部署我的 asp.net 网站时。我使用的是 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.

Source Error:

源错误:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常来源和位置的信息。

Stack Trace:

堆栈跟踪:

[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

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

版本信息:Microsoft .NET Framework 版本:4.0.30319;ASP.NET 版本:4.0.30319.1

回答by Emanuele Greco

If you have a Web Application

如果您有 Web 应用程序

you have to modify the properties for the .rptfiles:

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

  • Change Build Action to "Content" ("Embedded Resource" by default).
  • Change Copy to Output to "Copy always" ("Do not copy" by default).
  • 将构建操作更改为“内容”(默认为“嵌入式资源”)。
  • 将复制到输出更改为“始终复制”(默认情况下为“不复制”)。

If you don't want to change properties for each file, there's an easy way to default build action for non-default file-types.

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



If you have a Web Site

如果你有一个网站

you have to flag "Allow this precompiled site to be updatable"inside "Publish WebSite" menu

您必须在“发布网站”菜单中标记“允许此预编译站点可更新”



In both Web Application and Web Site

在 Web 应用程序和网站中

you can, instead of doing previous steps

你可以,而不是做前面的步骤

  • Not publish the report using the publish option, just copy them manuallyin publish folder.
  • 不使用发布选项发布报告,只需在发布文件夹中手动复制它们

and you must

你必须

  • Check if the reports exist and are accessible by the application(permissions, filepath,)
  • 检查报告是否存在并且可由应用程序访问(权限、文件路径、)

Good luck!

祝你好运!

回答by aleafonso

You will need to modify two properties in the .rpt files:

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

  1. Build Actionis set to "Embedded Resource" by default. Change it to "Content".
  2. Copy to Outputis set to "Do not copy" by default. Change it to "Copy always".
  1. 默认情况下,构建操作设置为“嵌入式资源”。将其更改为“内容”。
  2. 默认情况下,复制到输出设置为“不复制”。将其更改为“始终复制”。

Rebuild, Build deployment package and Publish. Done!

重建、构建部署包并发布。完毕!

回答by senzafine

I have got this same error message and have tried Googling and Googling and yet found the solution.

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

First, you have to check your ReportPathif is correct.

首先,您必须检查您ReportPath是否正确。

If you're using C#, this code might help:

如果您使用 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();                                   

回答by ANURAG

After try all above solution i got final solution is just copy your Crystal Report folder( where you save all crystal report into single directory) directly into location where you host you website. In my case it is c:/inetpub/www/xyz here xyz is publish folder.

在尝试了上述所有解决方案后,我得到的最终解决方案是将您的 Crystal Report 文件夹(您将所有 Crystal Report 保存到单个目录中)直接复制到您托管网站的位置。就我而言,它是 c:/inetpub/www/xyz,这里的 xyz 是发布文件夹。

回答by ErandaK

Re-install the "Crystal report engine" to the server and Build Action set to "Content"..

将“Crystal 报告引擎”重新安装到服务器并将构建操作设置为“内容”..