Method of installation and arrangement of Crystal Reports and method of arrangement of Crystal Reports
I. Report function "Crystal Report"
1) SAP Crystal Reports, version for Visual Studio 2010-(VS2010 installation package)
Http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0.exe
Including the crystal report file with DLL reported
2) SAP Crystal Reports, version for Visual Studio 2010-files used for deployment of Crystal Reports
Http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_mergemodules_13_0.zip
3) SAP Crystal Reports runtime engine for. NET Framework 4 (32-bit)-32-bit Client installation package
Http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0.zip
4) SAP Crystal Reports runtime engine for. NET Framework 4 (64-bit)-64-bit Client installation package
Http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_64bit_13_0.zip
Ii. Crystal Report tutorial
The following is a simple crystal report. In the project, create a form FORM1, a crystal report CrystalReport1, and a dataset DATASET1. (the settings of the crystal report are the same as those of previous versions)
Put a CRYSTALREPORTVIEWER on the form and write it under the LOAD event of FORM1. I dynamically LOAD the Crystal Report under the DEBUG folder; you can also specify the report name directly on CRYSTALREPORTVIEWER in the project;
Private void Form1_Load (object sender, EventArgs e)
{
SqlConnection con = new SqlConnection ("Data Source = 127.0.0.1; Initial Catalog = cldz; User ID = sa; Password = 888 ");
Con. Open ();
SqlDataAdapter da = new SqlDataAdapter ("select top 100 * from table", con );
DataSet ds = new DataSet ();
Da. Fill (ds, "ZZZPJ ");
String reportPath = Application. StartupPath + @ "/CrystalReport1.rpt ";
ReportDocument rd = new ReportDocument ();
Rd. Load (reportPath );
Rd. SetDataSource (ds. Tables [0]. DefaultView );
This. crystalReportViewer1.ReportSource = rd ;/
}
(2) There are two ways to publish vs2010 Crystal Reports;
1. Download the MSI file directly and install it on the client. The client can use it. 3) for 32-bit download. 4 for 64-bit download );
2. Download the MSM file 2) above. The first file is CRRuntime_13_0.msm. This is an English package. If you need to support Chinese characters, add a MSM file (CRRuntime_13_0_zh_cn.msm ); add a CRRuntime_13_0_maps.msm;
Package and release the package software that comes with VS2010 and create an installation project. The production process of the installation project is not detailed here. It is the same as the previous production process, right-click the project and choose "add"> "Merge Module. add the file ending with MSM and
C:/Program Files/Common Files/Merge Modules. Add the MSM of VC100 in the folder. If it is 32-bit, add X86. If it is 64-bit, add X64; final confirmation;
Right-click the project and select properties, and click the required system button. In the displayed dialog box, select the visual c ++ 2010 Runtime Library. Note that the system selects 32-and 64-bit runtime libraries;
Select the second option "Download necessary system components from the same location as my application" in the radio button below ";
In this way, the release preparation is complete. Select generate on the menu to generate a project or right-click the project to survive;
Note: (the "project" I mentioned above is not the "Project" in the menu above the VS toolbar; it is the project under your solution. For example, if you create an installation project named SETUP1, that is, SETUP1)
If the prepared installer fails to register a module during the installation process, please download a file suitable for your system version at the following URL to avoid errors;
CrystalReport for vs2010:
1. Find "SDK" v2.0 "BootStrapper" Packages "CrystalReports under the installation directory of Visual Studio in your development environment, copy the Installation File CRRedist2010_x86.msi to the server and install it.
2. If the program cannot run, copy the five dll files of the Crystal Report to the bin directory on your website. The names of the five dll files are as follows:
CrystalDecisions. CrystalReports. Engine. dll
CrystalDecisions. ReportSource. dll
CrystalDecisions. Shared. dll
CrystalDecisions. Web. dll
CrystalDecisions. Windows. Forms. dll 3. Exceptions Note: if the "invalid key number" is displayed in the Crystal Report, it is because the files in the previous one (2) are added to the layout. This has never been an effective solution. We recommend that you do not add the layout file when you deploy the client. Manually install the layout package in the client.