Thursday, December 29, 2005

CRYSTAL: EOleSyserror Exception - Class Not Registered

In the Windows environment DLLs consist of two things, classes (blueprints that objects are made from) and functions.

Windows provides a way to register a DLL using C:\WINDOWS\SYSTEM32\REGSVR32.EXE. As I understand it, this makes the classes and functions in that DLL available for use.

Recently I was faced with a problem where there was a delphi application which used Crystal Reports 9.0 which when it was ran on a non-developer machine gave an error: EOleSyserror Exception - Class Not Registered. I did some research and found that the application used the classes CRAXDRT_LIB, OleServer, and OleCtrls. My research also told me that Crystal Reports runtime uses ActiveX Controls and components. I went to the a help pdf on businessobjects.com and found a number of DLLs.

I eventually found that I could fix the problem with the following steps:
1. Find crviewer9.dll on a machine that has crystal reports installed.
2. Copy it into a folder like C:\WINDOWS\SYSTEM32
3. In the Windows Start Menu go to "Run".
4. type "cmd" at the prompt and click Ok.
5. type "C:\WINDOWS\SYSTEM32\REGSVR32.EXE C:\WINDOWS\SYSTEM32\crviewer9.dll"

Solved.

No comments: