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

2.9k views Asked by At

I have created a C# windows application and after , and i have created my reports using crystal report .and it works fine , but now i need to upgrade my interface , so i have created another c# windows application , after finishing my application screens i need my old reports to be embedded on my new interface application , what i did was r.click on my application \ add existing item \ selecting the .rpt files , but when try to run my application and open the report , application raise an exception "Load Report Failed " . The Inner Exception was "Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack" . I have check these solutions :

  1. report file path
  2. rpt file property : Build Action as "Content"
  3. rpt file property : Copy to Output Directory as "Do not Copy"
  4. rpt file properties : Put Empty for Custom Tool and Custom Tool Namespace

Put application is still raise the previous error . can someone help me to fix this proplem

3

There are 3 answers

0
CodingYourLife On

Crystal often gives you missleading error messages.

In my case I've set Copy to Output Directory of *.rpt file to "Do not Copy" (like you have it too) and I was passing the file path to the bin folder (where it doesn't exist) to ((ReportDocument)rpt).Load("[/bin/folder/path/report.rpt]");

->So check if the file(path) you want to load really exist

My Build Action is set to Embedded Resource (was default)

0
Muhammad Akram On

Use runtime path for loadding report I.e reportDocument.Load(Application.StartupPath + "\CrystalReport1.rpt");

Make sure report files are placed in specified folder which is directed by this path. use string str = Application.StartupPath; to be sure that which folder it refers to then place report files in this folder it will work fine. I faced similar problem like you and then I noticed this path indicates to bin\debug folder while report files in my project were somewhere else I just copied all files to debug folder and its working fine .... cheers

0
Joab Santos On

In my case, it was a problem with permission. Check if all users are allowed to access the file. enter image description here