Wednesday, August 08, 2007

Crystal reports won't open report in designer or runtime

In my inhouse application, that has been working since beta 2 of .net 1, I was having some problems with my setup application for the app. I decided to create a new setup application. I uninstalled the old application and installed the application from the new setup msi. Apparently the unistall of the first app, removed components needed for crystal reports (CR) to run. I got the following errors.
In run time: "the type initializer for crystaldecisions.crystalreports.engine.reportdocument threw an exception"
In design time when I tried to open a new report the error was: "crystal reports activex designer failed to open document"

The solution seemed to be to uninstall CR from the VS2007 setup and then reinstall. After doing this for 2 days (more later on my problems there), it still didn't work. What finally worked was the following:
1. Uninstall the runtime app (the one I installed with the new setup).
2. Unistall CR runtime for .net
3. Uninstall CR from VS2007 setup
4. Reinstall CR from VS2007 setup
5. open VS with a new app, create a new crystal report. You will be prompted for a liscense agreement, say yes and you've one.

About the VS2007 installation.

To remove/install CR from the VS2007 one needs to go to add/remove programs in the control panel, select cange VS2007. Click on change/remove components.
I had originally installed VS2007 from a DVD which I had misplaced. I downloaded the CD's from MSDN and the install would not accept the files on the CD (even though it was the same VS version as my install). I copied all the files to a directory on our network and mapped them to my computer. (You need to copy the cd's in reverse order, and agree to write over any duplicate files). I was able to do the reinstall from the mapped network drive but towards the end of the process it asked for some files which it would not accept from the mapped network drive, only from the 3rd CD I had downloaded.

Anyway after two days I finally got it to work.

0 Comments:

Post a Comment

<< Home