cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custome tool error: "Code generator 'ReportCodeGenerator' failed

Former Member
0 Likes
2,322

After updating to Crystal Reports SP1 for Visual Studio 2010, when I try an create a new crystal report in any project, my visual studio locks up and I get the following error:

=======================================================

Custome tool error: "Code generator 'ReportCodeGenerator' failed.

Exception stack = CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: Report engine not opened.

at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)

at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)

at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentOpened()

End of inner exception stack trace

at CystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentOpened()

at CystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

at CystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)

at CystalDecisions.VSDesigner.CodeGen.ReportClassWriter..ctor(String filePath)

at CystalDecisions.VSDesigner.CodeGen.ReportClassWriter..ctor(String filePath, String resourceNamespace)

at CystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator.GenerateCode(String inputFileName, String inputFileContent)"

=========================================================

I've tried uninstalling crystal reports for visual studio 2010 and the runtime for both 32bit and 64bit, and then reinstalling but get the same error. Development system is sever 2008 sp2 standard edition 64bit, with Visual Studio 2010 Ultimate.

I'd greatly appreaciate any help, I've been at a work stoppage for the last week.

Thanks

Tom Dey

View Entire Topic
Former Member
0 Likes

I assume this is for a project you are trying to upgrade and the project uses embedded reports (strongly typed)? If so to resolve this error message, complete these steps:

1. Click an embedded Crystal report in the Solution Explorer.

2. View the 'Properties' dialog box for that report.

3. Change the "VSDesigner" part of the custom build tool property string to "VSShell".

4. Right-click the report and click 'Run Custom Tool' again

Alternatively do not use embedded reports, particularly not if this is a web app. Use the .Load method instead.

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Former Member
0 Likes

I am using embeded strongly typed reports, however I can edit the existing ones without any problems. The error occurs when I try to add a new report to the project. The development environment locks up at that point, have to end the devenv.exe process at that point with Task Manager. I've tried creating a new project and adding a report to it and get the same result. The only way I can create a new crystal report is if I select a blank one. Then the system locks up if I go and try and change the datasource. This is a WPF project, no a web solution.

Former Member
0 Likes

WPF is a good piece of info to have. Are you able to create a new project as per the [WPF|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8] demo - and if so, add one of your reports to that project? (this is just a test...)

Umm, btw., just an FYI - this does work - at least on my computer.

- Ludek

Former Member
0 Likes

Yes, I can create a new project and add a report from my existing project to it. I am not having any problems with my existing reports. I can modify them as I need. My problem is I can not create any new reports, either in the project I am working on, or by createing a new project, unless I create them as a blank report with no data. As soon as I try and change the data connection of the new report (by using the Add new report wizard, or by right clicking a blank report and selecting Database, Database Expert) My development environment locks up.

0 Likes

Do you have a folder called c:\temp and if so are there any XML files in there? If you do rename it to c:\mytemp, if you are using Windows 7 or 2008 then change your environment variables to use c:\MYtemp and c:\myTmp unless you are using the default %users%\temp folders. Don't change them.

Don

Former Member
0 Likes

Weird - I posted the same possible solution before Don, even quoting [this|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533343330333633333337%7D.do] KB.

Hope it helps...

- Ludek

Former Member
0 Likes

I'm using 2008 standard.

User variables are

TEMP %USERPROFILE%\AppData\Local\Temp

TMP %USERPROFILE%\AppData\Local\Temp

Sytem Variables are

TEMP C:\Windows\TEMP

TMP C:\Windows\TEMP

I do have a c:\Temp folder that I use, but the newest xml file in it is over 2 years old.

Changed it to MyTemp, problem solved!! (other than I now have to point a lot of other things

to MyTemp.)

Thanks to both Don and Ludek for all the help. This issue was killing my schedule!

0 Likes

Hi T.,

Great that was the fix. The problem is CR uses those same variables which is what one must do to be Windows Certifiable. The problem is with old OS's the default was c:\temp so everyone simply continues to use it and there are file conflicts if it exists.

Thanks again

Don

PS - don't forget to search first before posting, there have been a lot of discussions and post on known issues.