cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with CR 2011 run time under VS 2011 using VB .NET

Former Member
0 Kudos
85

Hi all!

My .NET application with Crystal reports 2011 runs fine on developer's computer.

I downloaded from http://scn.sap.com/docs/DOC-7824 and manually installed on client's computer runtime 64 bits msi.

When I run my Visual Studio 2010 application it gives me an error "the type initializer for CrystalDecisions.Shared.SharedUtils threw an exception."

Any help will be appreciated.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Check the version of the CR assemblies referenced in your application. They should be 13.x.

Obviously, if your app is compiled as 32 bit, you will need to deploy the 32 bit runtime. If the app is compiled as "Any CPU" and installed on a 32 bit OS, you will once again need to install the 32 bit runtime.

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Ludek,

Thanks for your reply.

All our CR assemblies are 13.x.

We are building an .EXE file on Windows 7 64 bits machine and our clients machines are also Windows 7 64 bits.

When we run an .EXE file the forms with CR controls are not loading. We get an error

"the type initializer for CrystalDecisions.Shared.SharedUtils threw an exception."

-Alex

former_member188030
Active Contributor
0 Kudos

Hi Alex,

While developing the app, set the target platform to X64 instead of ANYCPU and then compile the application.

- Bhushan

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hi Bhushan,

While developing the app, we set the target platform to x86. We are using MS Access Database and connect from Visual Basic .NET via ADO.

Thanks.

former_member188030
Active Contributor
0 Kudos

If you are targetting 32 bit platform (X86) use the 32 bit CR redistributables on the client machine.

- Bhushan

former_member183750
Active Contributor
0 Kudos

Doing a few searches on the error, I came up with the following:

1528971 - Custom .NET web application throws "The type initializer for 'CrystalDecisions.Shared.Shar...

1605722 - Deployed CRVS2010 WPF application produces an error: The process terminated due to an unha...

http://scn.sap.com/thread/1871000

From the info in the above resources:

Make sure the full 4.0 framework is installed (not just client) - assuming you are targeting 4.0 framework.

Do make sure there are no references to CR assemblies other than 13 anywhere in the project (web.config, etc., etc.).

See if there is anything those resources that you see that may help.

- Ludek

Answers (0)