Skip to Content
avatar image
Former Member

CrystalDecision.Windows.Forms not present on other computer

Hi

I am having a problem with Visual Studio 2008 and Crystal Reports.

I have created a program with several forms where data is entered onto and saved to a .csv file. The data in this file is then used to populate a Crystal report and the Crystal Report is then viewed on the last form by means of a CrystalReportViewer.

I then create a .msi installation file (by means of a setup project) and package all the necessary files into this file. I then extract everything on another computer.

When I run the application on my computer (where development took place) the Crystal report works perfectly and the data is correct. But when I run the application on another computer and try to view the report I get the following error message:

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit,the application will close immediately.

An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly u2018CrystalDecisions.Windows.Forms, Version 10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304u2019 or one of its dependencies. The system cannot find the file specified.

I played around in the u201CMy Projectu201D properties and came across the publish options. Within this the application files can be selected that needs to be published (included in the setup project). In the list I can select and include the u2018crystaldecisions.windows.forms.dllu2019 (I expect this is what the error refers to when it states assembly). But if I select and include this and rebuild my project into the .msi file I get the follow warning within Visual Studio 2008:

Unable to apply publish properties for item "crystaldecisions.windows.forms". Insinger DBIP

I do not understand why I cannot add this assembly although it is necessary to run my application.

Within the Setup project dependancies u2018crystaldecisions.windows.formsu2019 are also not picked up. Why is this?

And as a side question: What is the code to update or set the datasource for the Crystal Report at runtime?

Thanks in advance,

PS. I have attached screen shots of my project code and how the forms and error look

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 04, 2008 at 02:18 PM

    Hi;

    You need to use our Merge Modules to deploy the needed runtime files for Crystal Reports.

    Crystal Reports Basic for VS 2008

    CR 2008 msi: https://smpdl.sap-ag.de/~sapidp/012002523100005985862008E/cr120_redist_install.zip

    CR 2008 click once: https://smpdl.sap-ag.de/~sapidp/012002523100005986302008E/cr120_clickonce.zip

    CR 2008 msm: https://smpdl.sap-ag.de/~sapidp/012002523100005985842008E/cr120_mm.zip

    For more information, see the section on deployment here:

    http://msdn2.microsoft.com/en-us/library/bb126227.aspx

    Regards,

    Jonathan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Ludek Uher

      Thanks for the link. I have seen that same article previously when performing my research.

      It states the limitations of the Windows Installer Deployment is that you must perform a separate installation of Crystal Reports runtime components.

      At least it works though.

      Thanks again for the help and advise!

      Another note for future developers who run into this problem: If you install your application on the target machine and it is missing some of the Crystal Reports runtime components, you will see an "Error 1001" message when trying to uninstall the application. It will then fail.

      I am assuming it is because it is trying to look for files that are not there. Instead of having to manually remove the application, you can copy the CrystalDesicisions.Windows.Forms.dll, CrystalDesicisions.Shared.dll, CrystalDesicisions.ReportSource.dll, and the CrystalDesicisions.CrystalReports.Engine.dll files to the application folder, then try to uninstall it. It should work.