Crystal Reports “Invalid Keycode” in Visual Studio 2015

Problem:

I developed an application in Visual Studio 2015 which uses Crystal Reports to produce reports. The report designer was working fine until I installed the application on my machine using an InstallShield LE installation project. After that, when I opened a report file in Visual Studio, I got an “Invalid Keycode” message and the report designer was blank. If I re-installed Crystal Reports For Visual Studio again the error went away and everything was back to normal.

Cause:

When  Crystal Reports For Visual Studio is installed it adds a keycode to the registry.

On my machine, the key name is

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Keycodes\CRNET

When InstallShield LE installs the Crystal Reports runtime engine merge module, by default it removes the keycode.

Solution:

Find the keycode in the registry (I used regedit).regedit

In Visual Studio, open the installation project; look under section 2 for the Redistributables; find and highlight the Crystal Reports runtime engine merge module redistributable.

redistibutables

Right click on this item and select Properties from the popup menu.

Select the Configurable values tab and look for the Keycode value in the list.

mergemoduleprops

Add the Keycode value (from the registry).

Save and build the installation project.

Now, when the Crystal Reports runtime engine merge module is installed, the keycode will not be lost.

 

 

3 thoughts on “Crystal Reports “Invalid Keycode” in Visual Studio 2015

  1. Thank’s a million!!!
    You saved my life!
    After 2 hours trying to do “step 2” (In Visual Studio, open the installation project…) I was not able to do that… I don’t know how to do that

    I just tryed to put your key in my registry and it worked!!
    Just try this first that key and if it works, all done!
    D2205-GM81000-4J4WP0G-CA6G1G1-04

    Thanks!!

  2. Thanks a lot!
    After windows updated today, somehow my old crystal report can’t be opened. This did save my life…

    And like Ricard, I use your key and it worked!

    Hope this would save some other people’s life as well

Leave a comment