Skip to Content
author's profile photo Former Member
Former Member

Custome tool error: "Code generator 'ReportCodeGenerator' failed

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 13, 2011 at 09:40 PM

    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]

    Add a comment
    10|10000 characters needed characters exceeded

    • 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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.