Click here to Skip to main content
14,882,036 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I have a windows 10 64 bit and i installed a visual studio 2015 and crystal report ver 13.0.23 for visual studio 2015 and crysatl Report run time 64 bit . 
but when make a setup package on client computer the program is running but the report when displayed make an error
the type initiallizer for "CrystalDecisions.shared sharedUnits " threw a exception.
note : 1- the Client computer is 64 bit and i installed a crystal report 64 run time .
2- when setup a 64 bit crystal report run time on my computer not worked in client

thank you

What I have tried:

i have change the properties of .rpt files Embeded resources to content and add the .rpt files to setup files and then instal oc cleint pc
Richard Deeming 22-Jan-19 7:17am
You need to look at the full exception details, including any inner exceptions, to find out what the problem is.

Unfortunately, "the type initializer threw an exception" is one of the most useless error messages that .NET generates. :)
Dave Kreskowiak 11-May-20 0:21am
Your project is probably compiled for a Platform target of "Any CPU". Go into your Project Properties and click on the Build tab. If it's targeting "Any CPU", change it to "x64", then rebuild your project.

1 solution

try this:

Install (CRRuntime_32bit_13_0_4.msi) on client machine.

It worked for me, and it's good if you setup your App as 32bit.
CHill60 11-May-20 4:58am
"and it's good if you setup your App as 32bit. " - not if they want to have a 64bit application. Dave Kreskowiak gave the correct solution - build the project targeting 64bit
Jassom 13-May-20 15:44pm
For Crystal Report should install 32bit to solve the problem, no matter what he setup his App (32bit or 64bit).. it will work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900