nikhil pinto
nikhil pinto

Reputation: 331

Installing a Vb.NET Windows application by including Crystal Report runtime

I have a Windows application developed in VS2010 and .Net framework 4.0. We have used Crystal reports in the application.

We need to create an installer by including crystal report runtime and the required visual C++ dependencies as per the following link: http://wiki.sdn.sap.com/wiki/display/BOBJ/Using+Crystal+Reports+for+Visual+Studio+2010+Merge+Modules+(MSM)+to+create+a+Setup+project

We tried the below 2 solutions as part of our effort so far. However we get errors when using the installer to install the application on the target machine.

The first solution included using the following merge module files as part of the installer (as per above link):
1. CRRuntime_12_3.msm
2. Microsoft_VC80_ATL_x86.msm
3. Microsoft_VC80_CRT_x86.msm
4. Microsoft_VC80_MFC_x86.msm
5. Microsoft_VC80_OpenMP_x86.msm

The second included using the following merge modules files as part of installer (as per this site: http://csharp.net-informations.com/crystal-reports/csharp-crystal-merge-module.htm):
1. CRRuntime_12_3.msm
2. CrystalReportsRedist2005_x86.msm
3. Microsoft_VC80_ATL_x86.msm
4. policy_8_0_Microsoft_VC80_ATL_x86.msm

Just as a troubleshooting step, we installed the visual C++ dependency on the target machine and tried installing the application with just the Crystal Report runtime file (CRRuntime_12_3.msm). This too was unsuccesful.

All the errors received so far were similar in nature, with the message saying failed to register dll (querypanel.dll, crtslv.dll).

The target machine has Windows 7 as the OS and the below installed: .NET framework 4.0 Client Profile .NET framework 4.0 Extended Microsoft visual C++ 2005 redistributable (i will uninstall this, because i need to create the installer by adding this dependency)

Any help on resolving this will be appreciated.

Upvotes: 2

Views: 3598

Answers (1)

nikhil pinto
nikhil pinto

Reputation: 331

I have found 2 workarounds to this. I will explain them for the benefit for anyone else who encounters the same issue.

In the first solution, you need to create 2 installers. One that will install the C++ dependencies. This installer should include only the C++ merge modules:

  1. Microsoft_VC80_ATL_x86.msm
  2. Microsoft_VC80_CRT_x86.msm
  3. Microsoft_VC80_MFC_x86.msm
  4. Microsoft_VC80_MFCLOC_x86.msm
  5. Microsoft_VC80_OpenMP_x86.msm

You need to make sure that in the detected dependencies the below policy files get added. These policy files should be available in your merge module folder located at C:\Program Files (x86)\Common Files. You need to refresh the detected dependencies folder to make sure that the policy files have been added:

  1. policy_8_0_Microsoft_VC80_ATL_x86
  2. policy_8_0_Microsoft_VC80_CRT_x86
  3. policy_8_0_Microsoft_VC80_MFC_x86
  4. policy_8_0_Microsoft_VC80_MFCLOC_x86
  5. policy_8_0_Microsoft_VC80_OpenMP_x86

Next you need to create the second installer that will contain your application output and the Crystal Report runtime merge module i.e.CRRuntime_12_3.msm.

Run these installer in sequence and bingo, you should have the crystal reports in your application working as expected.

The second solution is to directly install the C++ dependency by installing the following 2 components:

  1. Visual C++ 2005 SP1 Redistributable Package
  2. Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update

Then run the second installer created above that includes the application output and crystal report runtime merge module and everything should work fine.

Assuming you have built a 32 bit application using 32 bit crystal report runtime, you may run into another issue that deals with the target systems configuration if its a 64 bit OS. In that case you need to play around with the configuration settings and make sure that your application installs as a 32 bit application only. Else you will get an error saying: either the crystal reports registry key permissions are insufficient or.......

Upvotes: 2

Related Questions