?
Solved

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

Posted on 2009-04-04
4
Medium Priority
?
3,225 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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 …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

765 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