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 :
- report file path
- rpt file property : Build Action as "Content"
- rpt file property : Copy to Output Directory as "Do not Copy"
- 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
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)