Link to home
Start Free TrialLog in
Avatar of davidcahan
davidcahanFlag for United States of America

asked on

The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception

I just began running my development machine off Vista 64bit OS.   I have Crystal Reports XI installed (it's installed in the "Program Files (x86)" folder).  I'm developing in .net 3.5 framework.  Suddenly when i'm trying to run a page that creates a pdf using crystal reports i'm getting the following error:

The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception

I've tried installing the crystal reports redistributable X64 msi (because all google searches i did for the error message i was getting was telling me to do so) but it won't install.  It gives me the following error:  
"Another version of this product is already installed. installation of this version cannot continue.  to configure or remove the existing version of this product, use Add/Remove programs on the control panel".

I have no idea what to do at this point.  My questions are:

1)  Why am i getting the original error (the one about the type initializer throwing an exception"
2) is installing the redistributable the way to fix it?
3) if so, how do i get it to install
4) if not, what do i need to do to fix this problem

tearing my hair out.  I always seem to run into one problem or another with Crystal Reports.  I need to get this running ASAP so that i can finish the development of this project.

thanks for any help.
ASKER CERTIFIED SOLUTION
Avatar of mrcoolcoder
mrcoolcoder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrcoolcoder
mrcoolcoder

thanks but what helped you solve your problem?
Avatar of davidcahan

ASKER

actually, this might sound weird, but it wasn't anything specific in your message.  It was the fact that your message influenced me to dig deeper into the problem.  What actually ended up fixing it was grabbing the dll's in C:\Program Files (x86)\Business Objects\Common\2.8\managed and placing them in my Bin folder in the project.
Yes, that will work but the way I import assemblies is by the web.config.  Glad I could help.