日期:2014-05-19  浏览次数:20818 次

Crystal Report的问题
请教各位大虾一个问题:
            在安装了.net框架的机器上,怎样部署有水晶报表的软件.
            谢谢!

------解决方案--------------------
本机装有VS2005和CRYSTAL10,编写好的报表程序放在服务器上运行
服务器需要装些什么?
程序是B/S的WEB模式,服务器如今只装了IIS,FRAMEWORK2.0和cr10_net_server_install,还不能正常运行,
还需要装哪些组件才能正常运行?
虚心请教各位有经验的XDJM了?.........

----------------------------------

把程序做成安装程序,
对水晶10,制作安装程序前必须:

在服务器端发布的话需要利用vs.net建立一个安装项目
然后添加相应的模块
用 Crystal Reports 来部署 Web 或 Web 服务应用程序请参见
Crystal Report 部署概述 | Crystal Reports 部署授权

要部署应用程序,您需要在生成解决方案之前创建一个安装项目,并且向应用程序中添加必要的合并模块。

打开 Web 或 Web 服务应用程序。
在解决方案资源管理器中,右击 Web 或 Web 服务应用程序解决方案,指向“添加”,然后单击“新建项目”。
在“添加新项目”对话框中,选择“项目类型”窗格中的“安装和部署项目”,然后选择“模板”窗格中的“Web 安装项目”。单击“确定”按钮。
在解决方案资源管理器中,右击“Web 安装项目”,指向“添加”,然后单击“项目输出”。
在“添加项目输出组”对话框中,选择“主输出”和“内容文件”,然后单击“确定”。
将主输出添加到项目中后,将自动添加所有依赖项,如 Crystal_Managed2003.msm 或 dotnetfxredist_x86.msm。

在解决方案资源管理器中,右击“Web 安装项目”,指向“添加”,然后单击“合并模块”。
在“添加模块”对话框中,选择下列要添加到安装项目的合并模块,然后单击“打开”:
Crystal_Database_Access2003.msm
Crystal_Database_Access2003_chs.msm
Crystal_regwiz2003.msm
有关这些合并模块的说明,请参见 Crystal Reports 合并模块。

在解决方案资源管理器中,右击 Crystal_regwiz2003.msm 文件,然后选择“属性”。
在“属性”窗口中,展开 MergeModuleProperties,然后在“许可证密钥”属性框中输入一个有效的许可证密钥。
注意 每当部署 Crystal Reports for Visual Studio .NET 应用程序时,必须提供许可证密钥。
注册 Crystal Reports for Visual Studio .NET 后,将提供给您一个许可证密钥。可在“关于”对话框中找到此许可证密钥。从“帮助”菜单中,选择“关于 Microsoft 开发环境”。“已安装的产品”字段中列出了密钥号码。

从“生成”菜单中,选择“生成解决方案”以生成应用程序。
当部署到客户机或服务器时,应始终确保该计算机安装了 .NET Framework。

参考:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crystlmn/html/crconcrystalreportsmergemodules.asp



但都不能解决问题,也许是水晶报表版本的问题,网上也说得不明确,我用的是水晶报表10,最后在找到下面的资料,看了以后终于解决了。英文的,写得不错 如下:



Deploying an ASP.NET Application
The following procedures assume that you already have a Web application or Web services application ready for deployment. To deploy a Web application using the Crystal Reports merge modules:
1. In Visual Studio .NET, open your Web application, go to the View menu, and select Solution Explorer. Right-click your Web application solution and from the pop-up menu, select Add then click New Project.
2. The Add New Project dialog box appears. Select Setup and Deployment Projects in the left pane and select Web Setup Project in the right pane. Click OK.
3. In the Solution Explorer, right click the Web Setup Project and select Add then click Project Output.
4. The Add Project Output Group dialog box appears. Select Primary Output and Content Files to add to your Web Setup project.
NOTE
When the Primary Output is added to the project, several Crystal Reports detected dependencies will be added.

Select all of the Crystal Reports dependencies and right-click on the highlighted files and select ‘Exclude’ so that these files are not installed on the target machine.



5. In the Solution Explorer, right-click the Web Setup project and select Add then click Merge Module.

6. The Add Modules dialog box appears. Select the appropriate merge modules (See section above titled Crystal Reports 10 Merge Modules) and add them to your project. Click OK.

*** Steps 7 and 8 are for CrystalReports10_NET_EmbeddedReporting.msm only ***

7. From your Setup project, select the Crystal Reports merge module (you just added) to display the properties.

8. Expand the MergeModuleProperties and enter a valid license key the in Keycode Properties box.