Solved

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

Posted on 2009-04-04
4
3,211 Views
Last Modified: 2012-05-06
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.
0
Comment
Question by:davidcahan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 5

Accepted Solution

by:
mrcoolcoder earned 500 total points
ID: 24068342
1)  Why am i getting the original error (the one about the type initializer throwing an exception"

Make sure your web.config has a reference to the Crystal Reports Engine under assemblies.

2) is installing the redistributable the way to fix it?

No, the redistributable is intended for server that will not need the designer.  This is for a production box.

3) if so, how do i get it to install

Only way to install it will be to remove the current installation.

4) if not, what do i need to do to fix this problem

Try downloading all the Service Packs from SAP.  There are so many its confusing but there were several bugs that they fix.  You can find the location to SAP in the help.  Also, there is a strange situation that I encountered one time (I've installed Crystal on 22 production servers and workstations.  I had to grant WRITE access to the Temp folder on my system to the ASP.NET user account and the system account.
0
 
LVL 5

Expert Comment

by:mrcoolcoder
ID: 24243297
thanks but what helped you solve your problem?
0
 

Author Comment

by:davidcahan
ID: 24244248
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.
0
 
LVL 5

Expert Comment

by:mrcoolcoder
ID: 24244354
Yes, that will work but the way I import assemblies is by the web.config.  Glad I could help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question