Original Author:Han Yufeng
Crystal ReportThe Chinese name is "Crystal Report", because the report is powerfulVisual Studio. NETIntegrated. WhereVisual Studio. NET 2002InCrystal decisionsVersion:1.0;Visual Studio. NET 2002InCrystal decisionsVersion:1.1If you installCrystal Report 9.2, ThenCrystal decisionsThe version is2.0I have installed Crystal Report 11.0The interface is beautiful,Crystal decisionsThe version is3.0.
Many websites developed by the company use Crystal Reports. This article is a textbook I wrote for new students. I reorganized it in my spare time and moved it out. If it is helpful to you and doesn't mind, please leave your comments. If you think something is wrong, please let me know what you think after reading this article. All in all, let's just say: I should throw a brick first. Even if there is Jade, let's hit it ......
I,Create a test project
The solution name is"Reportsdeploy", Add a blank crystal report to the solution"Crystalreport1.rpt", SuchHttp://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy01.JPG
II,Add installation project
Right-clickSolution name"Reportsdeploy"(Note not the project name) → Add (Add) → New project (New project) → Select "installation and deployment project (Setup and deployment projects)" → Select"WebInstallation Project (Web Setup Project)" → Enter a name hereWebsetup2(Note the Project Storage path), such:Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy02.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy03.JPG
III,Add installation project output
Right-clickProject name"Websetup2" → Add (Add) → Project output (Project output) → Select Project"Reportsdeploy" → Select the main output"Primary", Content File"Content files"(Add). Note that the source file"Source files"This option, only select it, in the project"Crystalreport1.rptWill be included in the installation file, otherwise you must copy it yourself. See
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy04. Jpg
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy05.JPG
IV,Add merging Module
Right-clickProject name"Websetup2" → Add (Add) → Merge Module (Merge Module) → IfVisual Studio. NET 2002, Select"Database_access.msm""Database_access_enu.msm""Managed. MSM""Regwiz. MSM". Note: The dialog box path is"C: \ Program Files \ common files \ merge modules"See the figure below:
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy06.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy07.JPG
IfVisual Studio. NET 2003, Select"Crystal_database_access2003.msm""Crystal_database_access_enu2003.msm""Crystal_managed2003.msm""Crystal_regwiz2003.msm"See the figure below:
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy08.JPG
V,SetCrystal reposrtComponent serial number
Right-click the Crystal Report Registration Wizard module"Crystal_regwiz2003.msm" → Property (Properties) → InputVisual Studio. NETThe serial number of the Crystal Report in (License key). See
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy09.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy10.JPG
The crystal report serial number is obtained as follows: ClickVisual Studio. NETToolbar help (Help) → About ...... (About......) → Select the Crystal Report (Crystal Reports for Visual Studio. NET) →Click copy information (Copy info). See
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy11.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy12.JPG
VI,Generate the Installation File
Right-click the project name "Websetup2" → Generate (Build) → After the installation is complete, you canDebug"Folder to find the installation file. See
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy13.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy14.JPG
VII,Deploy website
Run and installProgram → Next step (Next) → Enter the name of the virtual directory corresponding to this project and the "Port" on which the project is installedIISSite → Next step (Next) → Complete (Close). See
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy15.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy16.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy17.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy18.JPG
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy19.JPG
8,Test website
OpenInternetInformation Service Manager (IIS) To see the installed virtual directory"Websetup2". Note that onlyIISThe virtual directory is displayed.Crystalreportwebformviewer2(SometimesCrystalreportwebformviewer1) To deploy the Crystal Report site. See
Http://blog.csdn.net/images/blog_csdn_net/cityhunter172/169136/o_ReportsDeploy20.JPG