Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve Crystal Report version conflict and make them work side-by-side?

I have VS-2005 and VS-2010 installed. As Crystal Reports is available as a separate download for VS-2010, I downloaded it and installed. My old projects were in VS-2010 which uses Crystal Reports version 10.0. New projects are in VS-2010 whose Crystal Reports version is 13.0.

I made a small application in VS-2010 with a single report. When I try to run this project, it displays errors:

The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll'

The indirectly-referenced assembly 'BusinessObjects.Licensing.KeycodeDecoder, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly was referenced by: C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll.

I can't uninstall old Crystal Reports (i.e., version 10). How to make these work side-by-side and what changes are required in GAC and web.config files.

like image 887
RKh Avatar asked Mar 17 '12 10:03

RKh


People also ask

Can I install multiple versions of Crystal Reports?

It is not possible to install different product updates of the same Crystal Reports major release version on the same computer.

How do I fix Crystal Reports?

To repair a Crystal Reports installation in MS Windows 10: In MS Windows 10 Settings, go to "Apps & Features" Select "Crystal Reports", and click "Uninstall" In "Crystal Reports setup", select "Repair"

How do I change the next page in Crystal Report?

Go to Report > Section Expert. Highlight the Group Footer section for the group that needs to have the page break. Mark the New Page After checkbox. Click OK.


1 Answers

This is a known issue with Crystal Reports. It doesn't do well with side-by-side versions in the GAC.

From SAP:

As each version of Crystal Reports has its' own specific runtime which must be correctly deployed, it is critical that the deployed runtime be in agreement with the Crystal Reports assemblies for Visual Studio .NET referenced in your project.

Use gacutil /u /f to forcefully uninstall the older Crystal Reports assemblies.

If it doesn't let you must uninstall Crystal Reports for Visual Studio 2005.

You can still keep side-by-side projects by copying the assemblies to a shared folder (e.g. '..\3rdParty\10.5.3700.0' and do a file reference to that folder instead of the GAC. The trick is to copy the Crystal Reports assemblies from the GAC via commnadline:

> copy c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\10.5.3700.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll c:\dev\3rdParty\10.5.3700.0

To discover which assemblies are deployed:

gacutil /l

Then you simply uninstall the copied assemblies from the GAC.

like image 156
KMoraz Avatar answered Sep 29 '22 20:09

KMoraz