Sei sulla pagina 1di 11

Crystal Reports XI and Visual Studio

.NET
Application Deployment

Overview
This document discusses the options for deploying Visual Studio .NET
applications built using the stand-alone version of Crystal Reports XI for
use in both Visual Studio 2002 and Visual Studio 2003. Both merge
modules and server install packages are discussed.

Contents
INTRODUCTION ............................................................................................ 2
INCLUDING REPORTS IN .NET APPLICATIONS ................................................ 2
OVERVIEW OF DEPLOYMENT METHODS ......................................................... 3
DEPLOYING USING THE MERGE MODULES ..................................................... 3
Report files (.rpt)..........................................................................................3
Crystal Reports merge modules ...................................................................3
Crystal11_NET_EmbeddedReporting.msm ................................................ 4
CrystalReports11_Maps.msm ....................................................................... 4

DEPLOYING USING THE SERVER INSTALL ...................................................... 4


OBTAINING AND ADDING THE KEYCODE ........................................................ 4
DEPLOYING AN ASP.NET WEB APPLICATION ............................................... 4
DEPLOYING A WINDOWS APPLICATION ......................................................... 6
CUSTOMIZING YOUR INSTALL....................................................................... 7
Choosing which database drivers to install................................................. 7
Choosing which export drivers to install..................................................... 8
Choosing whether to install the Crystal viewers ........................................ 9

.NET FRAMEWORK .................................................................................... 10


FINDING MORE INFORMATION .................................................................... 11
Knowledge Base Articles............................................................................11
Additional Resources .................................................................................11

3/29/2006 1:33:00 PM

Copyright 2003 BusinessObjects. All Rights Reserved.

Page 1

Crystal Reports XI and Visual Studio .NET

Application Deployment

Introduction
Crystal Reports XI extends the powerful reporting capability of Crystal
Reports on the Microsoft .NET platform. You can use the Crystal Reports
Designer in Visual Studio .NET (VS .NET) to create a new Crystal Report
or modify an existing Crystal report.
You can keep the report on a local computer or publish it as a Report
Web Service on a web server. Depending on whether you develop a
Windows or web application, you can host the report with either the
Windows Forms Viewer or the Web Forms Viewer, respectively.

Including reports in .NET applications


When reports are added to a .NET Windows or web application, they are
added by default as an embedded resource for the application. This
means that the report will be compiled into the assemblys manifest, and
will not be loaded from a separate report file (.rpt).
Having reports as an embedded resource allows .NET applications to be
distributed and deployed without having to distribute report files
separately. The advantage of this is that applications do not have to
deploy external report files and end users cannot modify them. The
disadvantage is that if a report needs to be modified, the entire
application must be recompiled and redeployed for the report changes to
be saved.
To prevent reports from being compiled into the assemblys manifest as
an embedded resource, use the following steps:
1.

After adding a report to a project, highlight the report in the .NET


Solution Explorer window.

2.

In the Properties window change the Build Action property from


Embedded Resource to None.

Using the above steps will not compile the report into the assemblys
manifest, therefore, reports will have to be loaded from disk. Reports can
be loaded from disk by specifying a file path using the Load method of
the ReportDocument object.
When deploying applications that do not embed report files, the report
files must be manually added to the setup projects. The advantage of
keeping reports outside of the assembly is that reports can be easily
modified and redeployed without having to recompile and redeploy the
entire assembly. The disadvantage is that strongly-typed report objects
cannot be used in the application and the reports must be loaded from
the hard-drive.

3/29/2006 1:33:00 PM

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 2

Crystal Reports XI and Visual Studio .NET

Application Deployment

Overview of deployment methods


There are two methods for deploying the Crystal Reports XI runtime
files to a deployment computer:

Using merge modules

Using the server install (also known as redistributable or


interactive install)

Both scenarios install the same files; however the method of deployment
is different. Merge modules are provided for those developers who want
to include the Crystal Reports runtime files along with the install
package for the surrounding application. The sever install is provided
for those developers who simply want to deploy the files to a server
machine as a stand-alone task.

Deploying using the merge modules


The components to add to Setup Projects for distributing and deploying
Crystal Reports 10 applications include:

Report Files (.rpt)

Crystal Reports Merge Modules

Report files (.rpt)


Report files (.rpt) need to be distributed when a .NET application is
deployed. How the report files are deployed depends on the need and
architecture of the application. Refer to the previous section, Including
Reports in .NET Applications for details on deploying report files.

Crystal Reports merge modules


The merge modules that need to be added to the setup project are
installed with Crystal Reports XI into the C:\Program Files\Common
Files\Merge Modules directory. Updated versions of the merge modules
can be found by searching for crxi_net_merge_modules.zip on the
Business Objects support site.
Previous versions of Crystal Reports required three or more merge
modules be included in a setup project to deploy reports. For Crystal
Reports XI, only one merge module needs to be included and a second is
optional:

3/29/2006 1:33:00 PM

Crystal11_NET_EmbeddedReporting.msm

CrystalReports11_maps.msm (optional)

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 3

Crystal Reports XI and Visual Studio .NET

Application Deployment

Crystal11_NET_EmbeddedReporting.msm
This merge module contains CrystalReportViewer controls, Crystal
Reports .NET SDK assemblies, RAS SDK Assemblies, report processing
engine, database components and export components. This merge
module is always required for Crystal Reports XI .NET applications.

CrystalReports11_Maps.msm
This merge module is used to install the files required to display
geographic maps inside reports. This merge module is only required if
geographic mapping is included in your reports.

Deploying using the server install


The server install works only with the full version of Crystal Reports XI
Developer or Server editions.
When deploying a web application, or deploying multiple Windows
applications to the same computer, it is recommended that the Crystal
dependencies be installed separately. This WindowsInstaller package is
in the C:\Program Files\Common Files\Merge Modules the file name
is CrystalReports11_NET_EmbeddedInstall.msi. Updated versions of the
install package can be found by searching for crXI_net_server_install.zip
on the Business Objects support site.
Run the install (.msi) file on the computer you are deploying to and enter
your Crystal Reports XI keycode when prompted. (see Keycodes for
more information.)

Obtaining and adding the keycode


When Crystal11_NET_EmbeddedReporting.msm is added to a setup
project, it exposes a Keycode property that accepts a keycode. This
keycode is emailed when the product is registered. This keycode can also
be found in Visual Studio .NET on the Help menu by clicking About
Microsoft Development Environment. The keycode is listed in the
Installed Products listbox.
The 23-digit keycode must be entered into the LicenseKey property for
the Crystal11_NET_EmbeddedReporting.msm merge module.
NOTE

For information on keycode errors, refer to More Information.

Deploying an ASP.NET web application


The following procedures assume that you already have a web
application or web services application ready for deployment. To deploy
3/29/2006 1:33:00 PM

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 4

Crystal Reports XI and Visual Studio .NET

Application Deployment

an ASP .NET Web application using the Crystal Reports XI merge


modules, complete these steps:

NOTE

1.

In VS .NET, open your web application and on the View menu click
Solution Explorer.

2.

In the Solution Explorer, right-click your web application solution,


click Add, and then click New Project. The Add New Project dialog
box appears.

3.

Click Setup and Deployment Projects in the left pane, click Web
Setup Project in the right pane, and then click OK.

4.

In the Solution Explorer, right-click the Web Setup Project, click


Add, and then click Project Output. The Add Project Output Group
dialog box appears.

5.

While pressing the CTRL key, click both Primary Output and
Content Files.

When the Primary Output is added to the project, some detected


dependencies will be added.

The dotnetfxredist_x86_enu.msm and


dotnetcrystalreports.msm dependencies should be excluded if
they are not already. To exclude these files, in the Solution
Explorer, right-click the file then click Exclude.

6.

Click OK.

7.

In the Solution Explorer, right-click the WebSetup project, click


Add, and then click Merge Module. The Add Modules dialog box
appears.

8.

Click the Crystal11_NET_EmbeddedReporting.msm merge module,


click Open to add it to your project, and then Click OK.

If you deploy a web application that uses an ADO .NET Dataset, then include the two
additional merge modules listed in the Runtime section above.

9.

From your WebSetup project, click the


Crystal11_NET_EmbeddedReporting.msm merge module to display
the properties.

10. Expand MergeModuleProperties and type a valid keycode in the


Keycode properties box. Refer to the Keycode section for more
information.

This is mandatory whenever you deploy a Crystal Reports for


Visual Studio .NET application.

11. You can now customize your install by excluding unneeded


database and export files. Refer to the Customizing Your Install
section.
12. To build your Web Setup project, right-click your deployment
package (WebSetup1) in the Solution Explorer and then click Build.
3/29/2006 1:33:00 PM

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 5

Crystal Reports XI and Visual Studio .NET

Application Deployment

You are now ready to deploy your ASP.NET Web application.

Deploying a Windows application


The following procedures assume that you already have a Windows
application ready for deployment. To deploy a Windows application
using the merge modules, complete these steps:

NOTE

1.

In VS .NET, open your web application and on the View menu click
Solution Explorer.

2.

In the Solution Explorer, right-click your windows application


solution, click Add, and then click New Project. The Add New
Project dialog box appears.

3.

Click Setup and Deployment Projects in the left pane, click Setup
Project in the right pane, and then click OK.

4.

In the Solution Explorer, right-click the Setup Project, click Add,


and then click Project Output. The Add Project Output Group
dialog box appears.

5.

While pressing the CTRL key, click both Primary Output and
Content Files.

When the Primary Output is added to the project, some detected


dependencies will be added.

The dotnetfxredist_x86_enu.msm and


dotnetcrystalreports.msm dependencies should be excluded if
they are not already. To exclude these files, in the Solution
Explorer, right-click the file then click Exclude.

6.

Click OK.

7.

In the Solution Explorer, right-click Setup Project, click Add, and


then click Merge Module. The Add Modules dialog box appears.

8.

Click the Crystal11_NET_EmbeddedReporting.msm merge module,


click Open to add it to your project, and then click OK.

If you deploy a Windows application that uses an ADO.NET Dataset, include the two
additional merge modules listed in the Runtime section above.

9.

From your Setup Project, click the


Crystal11_NET_EmbeddedReporting.msm merge module to display
the properties.

10. Expand MergeModuleProperties and enter a valid keycode in the


Keycode properties box. Refer to the Keycode section.

3/29/2006 1:33:00 PM

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 6

Crystal Reports XI and Visual Studio .NET

Application Deployment

This is mandatory whenever you deploy a Crystal Reports for


Visual Studio .NET application.

11. To build your Setup Project, highlight and right-click your


deployment package (setup1) in the Solution Explorer, and click
Build.
You are now ready to deploy your Windows application.

Customizing Your Install


In Crystal Reports XI and Visual Studio .NET, the
Crystal11_NET_EmbeddedReporting.msm merge module allows you to
specify installation options for database drivers, export drivers, and the
crystalreportviewers11 IIS virtual directory. By default, all of these install
with Crystal11_NET_EmbeddedReporting.msm.

Choosing which database drivers to install


1.

In your deployment project, click


Crystal11_NET_EmbeddedReporting.msm and in the Property
window, expand MergeModuleProperties.

2.

Set the value of a specific driver to 1, to include the driver with your
deployment project.

3.

Set the value of a specific driver to 0, to exclude the driver from your
deployment project.
Property name for database escription
driver
InstallACT
rystal Reports database driver for
CT databases.
InstallBTRIEVE
rystal Reports database driver for
ervasive database.
InstallCDO32
rystal Data Object database driver.
InstallCRDB_ADO
Crystal Reports database driver for
Microsoft ActiveX Data Objects/OLE
DB.
InstallCRDB_ADOPLUS
Crystal Reports database driver for
Microsoft ADO.NET.
InstallCRDB_CDO
Crystal Reports database driver for
Crystal Data Object.
InstallCRDB_COM
Crystal Reports database driver for
COM data provider.
InstallCRDB_DATASET
Crystal Reports database driver for
DataSet provider.
InstallCRDB_ODBC
Crystal Reports database driver for
ODBC.

3/29/2006 1:33:00 PM

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 7

Crystal Reports XI and Visual Studio .NET

Application Deployment

InstallCRDB_ORACLE
InstallCRDB_QUERY
InstallDAO
InstallFIELDDEF
InstallFILESYSTEM
InstallIBM_DB2
InstallINFORMIX
InstallP2BBDE
InstallP2BXBSE
InstallP2IXBSE_DLL
InstallP2SACL
InstallP2SEVT
InstallP2SEXSR
InstallP2SMAPI
InstallP2SMSIIS
InstallP2SOUTLK
InstallP2SREPL
InstallP2STRACK

InstallP2SWBLG
InstallSYBASE

Crystal Reports database driver for


Oracle.
Crystal Reports database driver for
Query Data.
Crystal Reports database driver for
Microsoft Data Access Objects.
Crystal Reports database driver for
Field Definitions.
Crystal Reports database driver for
File System data.
Crystal Reports database driver for
DB2 Server.
Crystal Reports database driver for
Informix Online Server.
Crystal Reports database driver for
IDAPI.
Crystal Reports database driver for
xBase.
Crystal Reports physical database
DLL for xBase.
Crystal Reports database driver for
Public Folder ACL.
Crystal Reports database driver for
NT Event log.
Crystal Reports database driver for
Exchange Server Admin.
Crystal Reports database driver for
Exchange Folders and Address Book.
Crystal Reports database driver for
IIS Log Files.
Crystal Reports database driver for
Outlook Data.
Crystal Reports database driver for
Exchange Public Folder Replica.
Crystal Reports database driver for
Exchange Server Message Tracking
Logs.
Crystal Reports database driver for
Web Log Files.
Crystal Reports database driver for
Sybase.

Choosing which export drivers to install


1.

3/29/2006 1:33:00 PM

In your deployment project, click


Crystal11_NET_EmbeddedReporting.msm and in the Property
window, expand MergeModuleProperties.

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 8

Crystal Reports XI and Visual Studio .NET

Application Deployment

2.

Set the value of a specific driver to 1, to include the driver with your
deployment project.

3.

Set the value of a specific driver to 0, to exclude the driver from your
deployment project.
Property name for export
driver
InstallU2DMAPI
InstallU2DNOTES

InstallU2DVIM
InstallU2FCR
InstallU2FHTML
InstallU2ODBC
InstallU2FPDF
InstallU2FREC
InstallU2FRTF
InstallU2SEPV
InstallU2FTEXT
InstallU2FXLS
InstallU2FXML

Description
Crystal Reports export driver for
MAPI Export Format.
Crystal Reports export driver for
Lotus Notes Database Destination
Export Format.
Crystal Reports export driver for
Lotus Notes Mail Export Format.
Crystal Reports export driver for
Report Export Format.
Crystal Reports export driver for
HTML 4.0 Export Format.
Crystal Reports export driver for
ODBC Export Format.
Crystal Reports export driver for PDF
Export Format.
Crystal Reports export driver for
Records Export Format.
Crystal Reports export driver for Rich
Text (rtf) Export Format.
Crystal Reports export driver for
Separated Export Values Format.
Crystal Reports export driver for Text
Export Format.
Crystal Reports export driver for
Excel Export Format.
Crystal Reports export driver for
XML Export Format.

Choosing whether to install the Crystal viewers


1.

In your deployment project, click


Crystal11_NET_EmbeddedReporting.msm and in the Property
window, expand MergeModuleProperties.

2.

Set the value of the property to 1, to include installation of the


crystalreportviewers11 IIS virtual directory with your deployment
project.

3.

Set the value of the property to 0, to exclude installation of the


crystalreportviewers11 IIS virtual directory with your deployment
project.
Property name for virtual

3/29/2006 1:33:00 PM

Description

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 9

Crystal Reports XI and Visual Studio .NET

Application Deployment

directory installation
InstallViewerVirtualDir

Property to control whether the


crystalreportviewers11 IIS virtual
directory is installed.

.NET framework
Since projects created in VS.NET rely on the NET Framework, the
framework must also be distributed and/or installed on the target
computer. When a setup project is created, usually the framework is not
automatically included. There are several ways to distribute the
framework. For more information refer to the following link:
http://msdn.microsoft.com/netframework/downloads/framework1_1/

3/29/2006 1:33:00 PM

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 10

Crystal Reports XI and Visual Studio .NET

Application Deployment

Finding More Information


Knowledge Base Articles
For information on keycode errors, search for the following knowledge
base articles on our support site:
c2010681 - Err Msg: "Invalid or missing Keycodev2.dll" when deploying
a .NET application
c2012716 - Err Msg: "... job failed because a free license could not be
obtained..."
c2011205 - Err Msg: "Cannot find keycodev2.dll or invalid keycode"
appears in VS .NET

Additional Resources
For additional .NET information and resources, visit these sites:
.NET Product site:
http://www.businessobjects.com/products/reporting/crystalreports/n
et/default.asp
Developer Zone:
http://www.businessobjects.com/products/dev_zone/default.asp
Listing of sample applications:
http://support.businessobjects.com/fix/samplescr.asp

www.businessobjects.com
No part of the computer software or this document may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system,
without permission in writing from Business Objects.
The information in this document is subject to change without notice. Business Objects does not warrant that this
document is error free.
This software and documentation is commercial computer software under Federal Acquisition regulations, and is
provided only under the Restricted Rights of the Federal Acquisition Regulations applicable to commercial computer
software provided at private expense. The use, duplication, or disclosure by the U.S. Government is subject to
restrictions set forth in subdivision (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at
252.227-7013.
The Business Objects product and technology are protected by US patent numbers 5,555,403; 6,247,008;
6,578,027; 6,490,593; and 6,289,352. The Business Objects logo, the Business Objects tagline,
BusinessObjects, BusinessObjects Broadcast Agent, BusinessQuery, Crystal Analysis, Crystal Analysis
Holos, Crystal Applications, Crystal Enterprise, Crystal Info, Crystal Reports, Rapid Mart, and
WebIntelligence are trademarks or registered trademarks of Business Objects SA in the United States
and/or other countries. Various product and service names referenced herein may be trademarks of
Business Objects SA. All other company, product, or brand names mentioned herein, may be the
trademarks of their respective owners. Specifications subject to change without notice. Not responsible for
errors or omissions.
Copyright 2005 Business Objects SA. All rights reserved.

3/29/2006 1:33:00 PM

Copyright 2005 Business Objects SA. All Rights Reserved.

crxi_net_deployment.doc

Page 11

Potrebbero piacerti anche