on 09-04-2008 11:47 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am having similar issues with my VS2008 Setup Project.
I have added the .msm files to my setup project and configured the key code. This does not seem to work.
I manually copied the Crystal Report dll files to the application folder on the target machine and was able to get it past the error mentioned in the first post. However, it also gave me an error for the "crystaldecisions.reportappserver.commlayer" file. I can not find this in the list of assemblies.
Is it really necessary to use the ".exe" version of Crystal Reports installer for each target machine. This also requires entering the Product ID. Seems like a waste of time to me.
What is the point in adding the msm files if they don't seem to setup the system automatically? Using VS2003 it auto detected the needed dll files, then I just added the msm files and all was ok.
Any other suggestions?
Edited by: Christopher Abbey on Sep 30, 2008 9:15 PM
1) do not copy Crystal Reports runtime from one computer to another
2) you do not have to use the exe to install and probably should not as you may be breaking licensing agreement
3) ensure that you are deploying the correct runtime
CR 2008 (CR 12.x) runtime file can be downloaded from here:
CR 2008 msi
https://smpdl.sap-ag.de/~sapidp/012002523100009351552008E/cr120_redist_install.zip
CR 2008 click once
https://smpdl.sap-ag.de/~sapidp/012002523100009351542008E/cr120_clickonce.zip
CR 2008 msm
https://smpdl.sap-ag.de/~sapidp/012002523100009351532008E/cr120_mm.zip
MLB Runtime
https://smpdl.sap-ag.de/~sapidp/012002523100009351352008E/crruntime_120_mlb.msi
CR for VS .NET 2008 (CR version 10.5) runtime is here:
CRRedist2008_ia64.msi
https://smpdl.sap-ag.de/~sapidp/012002523100006255262008E/CRRedist2008_ia64.zip
CRRedist2008_x64.msi
https://smpdl.sap-ag.de/~sapidp/012002523100006255272008E/CRRedist2008_x64.zip
CRRedist2008_x86.msi
https://smpdl.sap-ag.de/~sapidp/012002523100006255282008E/CRRedist2008_x86.zip
If noen of those versions are what you are using, please specify the actual version of the CR assemblies referenced in your project.
Ludek
With my research I was under the impression I needed version 12.0 for my setup project, so I included the msm files.
I am using VS2008 with Crystal Reports Basic for VS2008. I did more searching and realized I should be using 10.5. Is this correct?
The 10.5 redistribution msi file was already on the development computer so I copied it and ran it on the target machine separate from my application install. The applications worked with no problems.
Now I am experimenting to see if I can get it to install the crystal reports files along with the application files. I included the 10.5 msm files and redistribution msi file in my setup project thus far. Is this necessary? Should I only need the msm files?
The bundle of Crystal Reports in .NET 2008 is of version 10.5, that is correct. As to what is best for your deployment, see the following:
http://msdn.microsoft.com/en-us/library/bb126227.aspx
Look under "Deployment" heading. The options are described there.
Ludek
Ok.. I tried installing the application with the 'CRRedist2008_x86.msi" and msm files embedded in the setup project. This gave me the same error as before.
It seems as though I am required to manually run the 'CRRedist2008_x86.msi" on each target machine in order for this to work.
Are the msm files just for licensing then? They aren't for setup?
The msm should work in a deployment project. Please do have a look at:
http://msdn.microsoft.com/en-us/library/bb126227.aspx
Find, Deployment -> Deployment for Visual Studio -> Windows Installer Deployment -> for Visual Studio -> Creating a new Web Site Deployment Project with Windows Installer (or Creating a new Windows Application Deployment Project with Windows Installer)
depending on if this is a web or win app.
Ludek
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.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.