19

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

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.

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

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Rupesh Deshmukh
  • 191
  • 1
  • 1
  • 3

5 Answers5

35

If you have a Web Application

you have to modify the properties for the .rpt files:

  • 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

you can, instead of doing previous steps

  • Not publish the report using the publish option, just copy them manually in publish folder.

and you must

  • Check if the reports exist and are accessible by the application (permissions, filepath,)

Good luck!

Community
  • 1
  • 1
Emanuele Greco
  • 12,551
  • 7
  • 51
  • 70
  • 1
    +1 for "Check if the reports exist and are accessible by the application (permissions, filepath,)" dumb mistake, but something worth verifying. – patrickbadley Dec 17 '13 at 20:41
  • Fantastic. Thank you very much. Until finding this answer I never noticed that the Reports were not being copied to the publish folder. And the error was totally misleading. It was complaining about some ...AppServer.ClientDoc.dll not being able to load. I don't understand what the OP is waiting for to mark this as the answer. – Mikayil Abdullayev May 19 '15 at 07:09
  • @MikeJM You welcome Mike.. OP didn't mark the answer but people did!! – Emanuele Greco May 19 '15 at 09:22
  • "Allow this precompiled site to be updatable" work fine for me. You save my day. –  Jun 20 '16 at 15:23
  • 1
    "Allow precompiled site to be updateable" is ALSO required for Web Application Projects! (Out of the ~hundreds of sites discussing this error, your answer is the only one I've found that mentioned this setting. Thank you!) – Doug Sep 21 '18 at 14:39
6

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

  1. Build Action is set to "Embedded Resource" by default. Change it to "Content".
  2. Copy to Output is set to "Do not copy" by default. Change it to "Copy always".

Rebuild, Build deployment package and Publish. Done!

aleafonso
  • 2,244
  • 8
  • 38
  • 58
3

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

First, you have to check your ReportPath if is correct.

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

//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();                                   
Pavel Strakhov
  • 39,123
  • 5
  • 88
  • 127
senzafine
  • 31
  • 2
-1

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.

ANURAG
  • 5
  • 3
-2

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

ErandaK
  • 1
  • 2
  • In addition to my previous comment about not including your blog link, please also do not use emphasis like you are doing. – Andrew Barber Feb 15 '13 at 10:33