VS2010中水晶报表应用与部署

Vs2010的水晶报表; 选择下面一个下载(1是包括所有DLL);

下载安装后打开VS2010就可以在左边工具栏中看到CRYSTALREPORTVIEWER,并且可以新建水晶报表了;

用法跟以前版本的用法类似;  不过要注意下面几点;

A.  运行环境不能为.NET FRAMEWORK 4.0 CLINET PROFILE,要改为.NET FRAMEWORK 4,选中项目右键属性就可以更改了;

B.在项目中加一个APP.CONFIG(这是针对WINFORM项目),如果是WEB项目就不用加了,里面有一个WEB.CONFIG;在这配置文件中加上  <startup useLegacyV2RuntimeActivationPolicy="true">

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>

这可以避免ADO.NET与水晶报表运行时由于.NET版本问题出错

1)SAP Crystal Reports, version for Visual Studio 2010 - 
包括了报有DLL的水晶报表文件

2)SAP Crystal Reports, version for Visual Studio 2010 - 
水晶报表部署时用到的文件

3)SAP Crystal Reports runtime engine for .NET Framework 4 (32-bit)

只支持32位系统的包

4)SAP Crystal Reports runtime engine for .NET Framework 4 (64-bit)

只支持64位系统的

(1)下面做一个简单的水晶报表,在项目中建一个窗体FORM1,一个水晶报表CrystalReport1,一个数据集 DATASET1;(水晶报表的设置跟以前版本的一样)

在窗体上放一个CRYSTALREPORTVIEWER,然后在FORM1的LOAD事件下写上;我这是把水晶报表放在DEBUG这个文件夹下动态加载的;你也可以直接放在项目中在CRYSTALREPORTVIEWER上指定报表名称;

private void Form1_Load(object sender, EventArgs e)

{

SqlConnection con = new SqlConnection("Data Source=10.100.100.5;Initial Catalog=cldz;User ID=proc4;Password=77cc88");

con.Open();

SqlDataAdapter da = new SqlDataAdapter("select top 100 * from ZZZPJ", 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)vs2010水晶报表的发布有两种方式;

一,就直接下载MSI文件安装在客户端,客户端就可以用了;32位的下载上面的3);如果是64位的下载上面的4);

二,就是下载上面2)中的MSM文件,里面第一个是CRRuntime_13_0.msm这个是英文包;如果需要支持中文就加一个MSM,( CRRuntime_13_0_zh_cn.msm); 另外加一个CRRuntime_13_0_maps.msm 这个可以不用;

用VS2010自带的打包软件打包发布,新建一个安装项目,安装项目的制作过程这里就不详细说了,跟以前的制过程一样;制作完后,右键项目选添加―――合并模块――把上面提到的三个以.MSM结尾的文件加入进去,并且把

C:\Program Files\Common Files\Merge Modules文件夹中的VC100的MSM加入进去,如果是32位的就加X86的,如果是64位的就加X64的;最后确定;

再右键项目选属性,点击“系统必备”按钮;在弹出的对话框中选中 VISUAL C++ 2010 运行库,注意根据系统选,有32与64位的;

在下面的单选按钮中选第二项“从与我的应用程序相同的位置下载系统必备组件”;

这样发布的准备工作就做完了,选择菜单上的生成――生成项目或者右键项目点生存就可以了;

注意:(我在上面所有提到的“项目”不是VS工具栏上面菜单中的“项目”;是你解决方案下的项目,比如你新建了一个安装项目叫SETUP1,那就是指SETUP1)

如果制作好的安装程序在安装过程中出未能注册某一个模块请到下面网址下载一个适合你系统版本的文件安装,就可以避免出错了; 
http://www.microsoft.com/downloads/en/details.aspx?familyid=766a6af7-ec73-40ff-b072-9112bab119c2&displaylang=en

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
7-5 共7个压缩包(只有50M上传权限) Create rich reports within the familiarity of your Visual Studio development environment – for free Hit your report development deadlines and come in under budget without leaving Microsoft Visual Studio. Our report design software installs directly into Visual Studio. With this fully functional – and free software, you'll spend less and save time developing rich, interactive reports. Save time using powerful report creation, integration, and delivery tools Deliver interactive, graphical reports on any device through an XML Web services model Distribute highly formatted reports in rich-client Windows environments Enjoy flexible data access with support for over 35 data sources, major browsers and operating systems Extend your application with seamless report integration into WPF applications Seamless upgrade to SAP Crystal Reports 2011 for added report functionality Download SAP Crystal Reports, developer version for Microsoft Visual Studio now › Share 2 Features and Functionality Collapse All Features and Functionality Learn more about the features and functions of SAP Crystal Reports, developer version for Microsoft Visual Studio. Powerful designer features for creating rich reports Flexible Windows and Web application features support development ASP.NET features support your ASP development efforts Broad data access enables multiple sources and dynamic data output Platform features provide support and management for SAP Crystal Reports projects Get all the details on SAP Crystal Reports, developer version for Microsoft Visual Studio features › Less Technical & License Resources Discover if SAP Crystal Reports, developer version for Microsoft Visual Studio is right for you. Get started by reviewing the technical, data access and license details. Access virtually any data sources via ODBC, OLE DB or native connections Licensed for report design, runtime distribution and report viewer distribution Add reporting to thick client and intern
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值