Tuesday, June 23, 2009

Deploying web-applications which use Crystal-Reports

Creating an installer is very much necessary to distribute the reporting applications being used in the web-application. In this section we are discussing how to deploy the web-application(which is using crystal reports) using Microsoft Visual Studio 2005.
1. Create a setup file

Go to File> New Project >Setup and Deployment > Web setup project As shown in the figure below. Specify the name of the setup file and click on "OK"

2. There should be a bin folder inside "Web Application Folder" . Add references used in your project including the references used for Crystal report in the folder. You can do so by right clicking the "bin" folder and going to Add > Assembly

3. Now, you need to add all the files of your website to the setup file. Right click on the "Web Application Folder" in the file system column or the name of the setup file on the solutions explorer; go to Add > File and add all the files of your website.

4. Besides files and references, the special kinds of files called merge modules also need to be added to the setup file. Merge modules help us to determine the run time requirements of crystal reports such as formats of the reports. Mainly, there are three kinds of merge modules, Managed.msm, Database_Access_enu.msm and Regwiz.msm. You can download the merge modules for visual studio .net from here.

5. You can add the merge modules by right clicking on your setup file at the solution explorer and go to Add > Merge Modules.

6. After adding all three merge modules, you need to specify your licence of crystal report as well. You can get the license key by registering for Crystal reports. To register for Crystal reports, go to the crystal report menu of your crystal report application, select "Register/Change Address" and follow the wizard. You will get a licence key in your email after the successful registration.

7. Once you get the license key, right click on the Regwiz.msm merge module file in the solution explorer, go to properties; Click on Merge module properties and paste the License key there as shown in the figure below:

8. The addition of all the files are completed. Now, you have to specify the prerequisites of the web application. Right click your setup file in the solution explorer and go to properties. Click on the "Prerequisites" command button. Check on the top three check boxes if they are unchecked. Choose " Download prerequisites from same location as my application" radio button below. And then click on OK.

Your web-application setup file ready now. Run the setup file on the server. If crystal report is not installed on your server, this setup file will install that first because of the prerequisites you specified. It is better to remove the previously installed crystal report ( if it is installed already), from the control panel of the server and start running the set up file.

Please add a line here if you have any questions/confusions regarding this post and regarding the deployment of the web-application.

No comments:

Post a Comment