Friday, August 01, 2008

Crystal Reports Viewer - Physical Database Not Found

I was assigned to troubleshoot a problem with an old application that had been written in our shop using Visual Basic 6 and Crystal Reports 8.5. The application when installed on brand new machines would crap out with the following generic error message "Physical Database Not Found".

clip_image002 

Well it turns out the problem has nothing to do with the database itself, but with the dependencies that Crystal Reports has on other dlls.image

After a lot of muddling around here is how I got the issue to go away. You need to get your hands on the following dlls:

  • CRAXDRT.dll
  • craxdrt_res_en.dll
  • p2smon.dll (the p2xxx.dlls are the Crystal Reports Physical Database DLL for xxx. p2smon are the physical database dlls for Active Data Reporting)
  • crviewer.dll

And then do the following:

  1. Copy craxdrt.dll and craxdrt_res_en.dll into the Windows\System32 folder
  2. Register craxdrt.dll.
    - at the command prompt type regsvr32 craxdrt.dll
    - verify that you get a dialog that confirms that registration was successful
  3. Drop p2smon.dll and crviewer.dll into the same folder as your application's executable.
  4. Run your application and verify that Crystal Reports viewer shows up.

Other stuff:

The above instructions work with an application that was created using CR 8.5.

If the above instructions dont work then try dropping the following files into the application folder and see if the application begins to work: (These files might be needed by CR to correctly connect to the database. In my case, we were connecting using ADODb and it worked with p2smon. You might need one of the other p2 dlls - the physical database dlls)

p2solap.dll
p2soledb.dll
p2sodbc.dll

into System32 and registering them.

CRAXDDRT.DLL
CRDESIGNERCTRL.DLL

Other dependencies that might be needed are:
IMPLODE.DLLimage
CRPAIG80.DLL
SSCSDK80.DLL
PG32CONV.DLL
COMCAT.DLL
OLEPRO32.DLL
crxf_RTF.DLL
crxf_PDF.DLL
crtslv.dll
exportmodeller.dll
CRXLAT32.DLL

Unfortunately - you will typically need a Crystal Reports installer CD to get most of the files referenced above. If you dont, then look for them on a machine where the application works. It is a shame that SAP (they currently own Business Objects and Crystal Reports), dont provide a way to download these redistributables for their API.

BTW:

If you have dsr files in your VB6 project and you are unable to open them. And the dsr file when opened in NotePad has a reference to a COM object with GUID "BD4B4E61-F7B8-11D0-964D-00A0C9273C2A". And if the referenced object has an attached binary file with extension dsx. Then it most probably was created using Crystal Reports Designer. (To confirm, search for "Crystal Reports ActiveX Designer" in the DSX file).

image image

You will need to install Crystal Reports to be able to view or edit these files. A word of advice: If you have Crystal Reports working on your machine, then export these files to .RPT, so that you can open them in a later version of Crystal Reports. These files are becoming less and less used and soon no one will even remember how they are edited or used.

More useless information - the CR designer needs the craxdui.dll. But in my experience just copying this dll and registering it - isnt enough. It obviously has some dependencies that I havent been able to figure out as yet.

14 comments:

Rich said...

Hello Raj,

Thank you very much for this! It helped me solve the very same problem which was making me crazy.

Rich

Variety of World said...

Hello Raj,

Thank you so much for this! It great helped me solve that error.

Nalinda

Yoel Silver said...

Your solution was very impressive and worked first time - thank you for all the work and energy you must have put in - you are a true crystal reports guru

Devubha Manek said...

Hello Raj,

Hamesa correct bat bol dete ho man!
Mine is 10/10

Thanks
Devubha Manek

Dario said...

This really help me.

Thanks for your solution.

Anonymous said...

Hats off to you! Fixed my old dog of a program right up in Win 7 enviro.

Thanks for taking the time to post.

Anonymous said...

thank you very much

MagentoC said...

Thanks for sharing this.

Regards,
Magento Templates

MagentoC said...

Hello Raj,

Thanks for sharing this=.this is so help full for me really thanks.

Regards,
Magento Templates

Greg Gorecki said...

Thanks Raj,

p2smon.dll was missing from c:\windows\system32. I copied it into that directory and all works fine.

Greg Gorecki, MCSD, MCTS Biztalk

Jay Soni said...

I had the exact problem explained.
It helped me saving a lot of time.
Thanks.
Keep up the good work.

Jay Soni said...

I had exactly the same problem.
It helped me saving a lot of time.
Thanks.
Keep up the good work.

wien said...

I have a problem when CR 8.5, when I reporting it's running well, but when reporting with chart / graph, it's say's run time error 20500, not enough memory to operation, can somebody help so solve this problem? because if I running a report with CR 8.5 installed on the machine it's not a problem

Erwin

Karl Williams said...

We also needed NTWDBLIB.DLL in either the application folder, or in the System32 or Syswow64 folder as appropriate.