cancel
Showing results for 
Search instead for 
Did you mean: 

CR not working for me with VS2010

Former Member
0 Kudos

OK with VS2008 I had no problem.. But with VS2010 I can't get Crystal Reports working at all...

I have installed

- VS 2010 Sp1

- Full Crystal Reports 2008 Sp3

- CRforVS_13_0_1

- CRforVS_redist_13_0_1 (for 32bit and 64bit)

I have tried unistalling everything including VS and rebuilding my machine but that didn't work....

What happens is when I create a new project and add a crystal report (or try to use any existing ones) the code behind files are blank and I have the error as below...

Error 1 Custom tool error: "Code generator 'ReportCodeGenerator' failed. Exception stack = CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: The Report Application Server failed

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

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

at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

--- End of inner exception stack trace ---

at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

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

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

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

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

at CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator.GenerateCode(String inputFileName, String inputFileContent)" c:\users\joele\documents\visual studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\CrystalReport1.rpt 1 1 WindowsFormsApplication1

Can someone help with this please?

Edited by: jeisner on Sep 13, 2011 9:14 AM

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

I moved your post to the .NET SDK forum.

You need to install CR for VS 2010, not just the redist files. Run this on your PC:

http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_1.exe

Then search here, lots of "gotcha's" you need to look for.

No C:\temp folder

x86 or x64 only, don't use AnyCPU

Framework for your project must be set to Full version and not the Client.

If you are using ADO.NET as your DB driver you need to set the legacy mode in your app.config file.

Thank you

Don

Former Member
0 Kudos

Yes as per list I have CR for VS installed "- CRforVS_13_0_1"

I can modify CR reports fine within the designer but get that error on build and the code behind files are not generated..

As to other points...

"No C:\temp folder" - I have one

"x86 or x64 only, don't use AnyCPU" - Tried all three and same issue

"Framework for your project must be set to Full version and not the Client." - It is

"If you are using ADO.NET ... ... " - I am not, I can start a fresh project and do nothing else other than add a crystal report and it does not work..

Thanks for the suggestions, any more possible "gotcha's" with this version of crystal reports???

Edited by: jeisner on Sep 14, 2011 2:07 AM

0 Kudos

"No C:\temp folder" - I have one

That's the problem, rename it to \MyTemp

The reason why is older versions of Windows used that location for temp files, now it's defined as %users%\temp so your temp folder is under your profile. CR follows Windows rules and simply uses the same wild card, so if c:\temp exists then we start using it. There are 2 file types that cause the database portion problems, XML files and CR temp files...

ALSO - you must set it for x86 OR x64, MSIExec will install the wrong runtime if it detects a 64 bit OS but your app is compiled for 32 bit mode. It's a VS issue and not a CR problem.

Thanks

Don

Edited by: Don Williams on Sep 14, 2011 8:13 AM

former_member183750
Active Contributor
0 Kudos

Documented in KB [1626920 - Custom tool error: "Code generator 'ReportCodeGenerator' failed|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%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333633323336333933323330%7D.do]

- Ludek

Former Member
0 Kudos

OK set for x86 and also rename c:\temp to c:\mytemp....

No Difference... Still fails with the same error....

former_member183750
Active Contributor
0 Kudos

If you have VS2008 on that box, check if Crystal Reports Basic for Visual Studio 2008 (V 10.5) is also installed. If it is, uninstall CR 10.5 (I think you can do it from Add \ Remove. Alternately, you may be able to do it via Repair of VS2008).

Check to see that only references to CR 13.x are in your project as well as web.config - if a web app.

Make sure you are using the Full 4.0 framework.

Delete the CR viewer off the form and re-add it.

- Ludek

0 Kudos

What happens if you create a new Project?

Also see this post for more "VS 2010 upgrade issues"

Thanks

Don

Former Member
0 Kudos

I start a new project, add a crystal report, it adds in the references (version 13.x only) and has the error in the background that I reported and fails to fill in the code behind too....

NO, Crystal Reports Basic for Visual Studio 2008 is not installed...

I was using framework 2.0, but I have tried FULL framework 4.0, and same problem....

I am not using a CR viewer, it is simply adding a report to a project that causes the failure..

Answers (0)