Showing posts with label invalid keycode. Show all posts
Showing posts with label invalid keycode. Show all posts

Tuesday, November 07, 2006

Registering Crystal Reports

Are you getting an exception
"Internal Exception: Cannot find KeycodeV2.dll or invalid keycode."
when you try to open a report done by Crystal reports?

Errors relating to KeycodeV2.dll can occur in VS.Net because of one of the following issues.
1. KeycodeV2.dll file is not accessible,
2. Does not have access to the registry keys which relate to KeycodeV2.dll,
3. Does not recognize the product Keycode stored in the registry.

Here I will address the last one, because most of the people doesn't know how to correctly register Crystal.

  • As the first step you have to add the licensing merge module which is Crystal_regwiz2003.msm (if you are using VS.Net 2002 the file will be RegWiz.msm) to your setup project.
  • Then get to the properties window of the Merge Module.
  • Expand the Merge Module Properties section in the Properties window and you will see a property called License Key.
  • Enter the License key of your Crystal reports there.

If any one is wondering what the License key is, read on,

To get a license key you have to register Crystal with Business Objects. After registering you will get an email containing a registration number and unique key code (If your copy is already registered you can get to the Product Code by going to menu Help -> About Microsoft Development Environment, in Visual Studio .NET. If it is registered the Product Code is the code besides Crystal Reports for Visual Studio .NET.) Copy the Product Code (Product Code consists of 19 characters and looks something like xxxxx-xxxxxxx-xxxxxxx.) into the License Key property of the above merge module.

Next time you build and install the project the error will vanish.

If you still get the error or if you are interested in reading more into this following URL might be useful to you.

http://support.businessobjects.com/communitycs/technicalpapers/crnet_keycodev2.pdf