Click here to Skip to main content
15,884,078 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Friends,

I have developed C# application using visual studio 2008, it has the option to generate few reports using crystal report function with MySQL database connectivity. I have tried every methods to run the application in client machine. But getting following two type of errors:

(Please be noted that, application is working very well, the problem is occur while generate the CrystalReport)

1. Once add all the dll files to the application path:
the type initializer for 'crystaldecisions.crystalreports.engine.reportdocument' threw an exception

2. Without add the dll files to the application path:
"Could not load file or assembly "CrystalDecisions.Windows.Forms, Version=10.5.3700, Culture-neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."

My application .net version is 3.5.

I installed following three setup files in client machine, but still same error.
Crystal Reports .NET 2.0.Redistributable
CRforVS_redist_install_32bit_13_0_2
CRforVS_redist_install_32bit_13_0_5

Please help me to get rid of this error.

Thanks!
Posted
Updated 10-Jul-14 2:59am
v2
Comments
CHill60 10-Jul-14 9:06am    
Is the app compiled for '32-bit', '64-bit' or 'Any CPU'?
abdulsafran 10-Jul-14 9:35am    
CHill60, Thanks for the reply, this is compiled as Any CPU, I tested 32bit as well.

1 solution

Do you install the Crystal Reports Runtime on the client machine? Probably not. Just copying the .DLL's in your bin folder will not work as your missing the CR runtime.
 
Share this answer
 
Comments
abdulsafran 10-Jul-14 9:37am    
Dave Kreskowiak, Thanks for the reply, can you send me proper link for the runtime? I installed followings on client machine: Crystal Reports .NET 2.0.Redistributable, CRforVS_redist_install_32bit_13_0_2, CRforVS_redist_install_32bit_13_0_5
Dave Kreskowiak 10-Jul-14 18:10pm    
https://www.google.com/#q=visual+studio+2008+crystal+reports+redistributable
abdulsafran 10-Jul-14 11:00am    
Thanks for your words and help Dave!!!

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



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