13
Answers

CrystalReport error??

How can solve this problem? The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception

Answers (13)

1
Photo of Amit Gupta
NA 16.5k 25.7k 7y
Also beasure that you had installed the runtime according to x86/x64 bit architecture
Accepted
1
Photo of Amit Gupta
NA 16.5k 25.7k 7y
If you have set the property SpecificVersion =true of the crystal report dll then you MUST install the particular version otherwise the lastest stable version should be sufficient.
1
Photo of Amit Gupta
NA 16.5k 25.7k 7y
Yeah! 
Try to change the platform target from AnyCPU to x86 and check for the solution
 
x86/x64 architecture  means that your target computer and crystal report architecture should be same. As the screenshot depicts x64 version, do check that your system too else install the x86 version.
 
Good Luck 
1
Photo of Amit Gupta
NA 16.5k 25.7k 7y
Can you post the inner exception details. In the meanwhile?, do check that if you had targeted AnyCPU and change to x86 and rebuild and confirm.
1
Photo of Amit Gupta
NA 16.5k 25.7k 7y
Have you tried installing crystal report runtime on the target machine?
0
Photo of sampath tharanga
NA 125 757 7y
Amit Gupta No broo.... its working after the CRforVS_13_0_21 installed. Runtime engine 21 and 22 installed. but comes same upper error. Then I have only one solution. Again installed CRforVS_13_0_21. Anybody have any Ideas.....?
0
Photo of sampath tharanga
NA 125 757 7y
Problem solved broo..... thanks for your advice and help.
 It is CR Runtime engine Version problem. PC available version is CR Runtime 13.0.18. However, I installed the CRforVS_13_0_21 to the PC. Then solve the problem. Therefore can guess it is the version problem.
  
 
 Visual Studio 2017 >= 21
So, 
CRforVS_13_0_21  equal 21
CR Runtime 13.0.18 but 18
Then sometimes CR Runtime 13.0.21, CR Runtime 13.0.22 installed fix this error. 
0
Photo of sampath tharanga
NA 125 757 7y
@Amit Gupt Thanks. I will try it.
0
Photo of sampath tharanga
NA 125 757 7y
I think this details.
0
Photo of sampath tharanga
NA 125 757 7y
this is runtime details. it is x64.
0
Photo of sampath tharanga
NA 125 757 7y
this is installed Runtime engine,
0
Photo of sampath tharanga
NA 125 757 7y
this error comes try to printing bill.
0
Photo of sampath tharanga
NA 125 757 7y
yes. installed. Then comes this error?