谁能给我一个完整的.net(c#)下的基于sql的push模式的水晶报表

hthy 2003-08-30 05:55:36
谁能给我一个完整的.net下的基于sql的push模式的水晶报表,包括.aspx,.cs,.rpt,文件,我自己作了一个图片怎么也显示不出来,参考一下你们的,谢谢了
...全文
34 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
adminlxj79 2003-09-01
  • 打赏
  • 举报
回复
up!

lixj@cnki.net
hthy 2003-08-31
  • 打赏
  • 举报
回复
up
china91chen 2003-08-30
  • 打赏
  • 举报
回复
china91chen@sina.com
hthy 2003-08-30
  • 打赏
  • 举报
回复
up
hthy 2003-08-30
  • 打赏
  • 举报
回复
email:wangfangzheng@eyou.com
水晶报表一个功能强大的报表工具,现在已经被Microsoft Visual Studio 2005(下文以VS2005简称)集成在一起。喜欢水晶报表的朋友可以方便使用了。我把水晶报表在vs2005的使用方法总结一下,供大家参考。 首先介绍一下我用的软件环境:Microsoft Visual Studio 2005;Microsoft SQL Server 2005 【数据用例】 服务器:SQLEXPRESS 数据库名:Test 数据库表:T 数据: 图1 【说明】 水晶报表在应用时分两种方法,分别是拉模式(PULL)、推模式PUSH)。拉模式:在水晶报表生成时的数据源是从水晶报表文件中的SQL语句从数据库中提取的,在编程时不用重写SQL语句,但要加上登录信息(具体方法,后面介绍)。推模式:在水晶报表生成时的数据源,是用编程时重写水晶报表SQL语句而生成的dataset对像。也就是说,推模式是用dataset组装水晶报表水晶报表组件介绍。水晶报表在VS2005中有两种组件,在WEB项目是分别是CrystalReportSource,CrystalReportViewer。在FORM项目里是分别是crystalReport,CrystalReportViewer。 CrystalReportSource,crystalReport是水晶报表的数据提供者;CrystalReportViewer是水晶报表的浏览器。另外还要介绍一下水的报表的文件是以rpt为扩展名的文件,该文件可以用VS2005生成。 下面分别介绍具体操作方法: 拉模式(PULL): 在拉模式中如要在水晶报表中的SQL语句加上条件参数时要用{?参数名}方式给出。例:“Select T1, T2, T3 FROM T Where T1='{?parm}'” parm就是参数名 以下例子中所用到的水晶报表文件中使用的SQL语句是“Select T1, T2, T3 FROM T Where T1='{?parm}'” parm就是参数名。 【WEB方式下】 using CrystalDecisions.Shared; using CrystalDecisions.CrystalReports.Engine; /// ///功能:拉模式提取水晶报表 ///个人主页:http://www.dzend.com/ /// /// /// protected void Button_pull_Click(object sender, EventArgs e) { // CrystalReport.rpt是水晶报表文件的名称;CrystalReportSource1是从工具箱加到页面上的水晶报表数据源对像。 CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport.rpt")); // SetDatabaseLogon 拉模式中必须用这个方法来设置登录信息,参数一:用户名;参数二:密码;参数三:服务器;参数四:数据库名 CrystalReportSource1.ReportDocument.SetDatabaseLogon("sa", "123456", @"SYWZSWL\SQLEXPRESS", "Test"); //给水晶报表传参数,参数一:是参数名,参数二:参数值; CrystalReportSource1.ReportDocument.SetParameterValue("Title", "这是一个测试报表"); CrystalReportSource1.ReportDocument.SetParameterValue("Parm", "1"); //绑定水晶报表数据源。 CrystalReportSource1.DataBind(); // CrystalReportViewer1是水晶报表浏览器,下面是给该浏览器赋上对像 CrystalReportViewer1.ReportSource = CrystalReportSource1; CrystalReportViewer1.DataBind(); }
Crystal Reports for Visual Studio 2005 SDK Tutorials: Sample Code Projects 1. This setup contains sample code projects for Crystal Reports for Visual Studio 2005. 2. This sample code corresponds exactly to the tutorials contained in the Crystal Reports for Visual Studio 2005 online help. Each project has been built by following the instructions in their corresponding tutorials, and instructions and explanations have been placed within the tutorial sections rather than in code comments. Therefore, it is highly recommended that you consult the tutorials for a full explanation of the structure and best practices demonstrated within this code. 3. If you wish to run the tutorial sample code projects, check the code for any machine-specific values and confirm that they are customized for your specific machine. These may include: * ODBC data source settings for reports * file directory paths * network printer paths * API property settings for database connections, including: * database server names * database names * userIDs * passwords * complete database connection strings 4. For security reasons it is recommended that you use Integrated Security (Windows Authentication) for your SQL Server database connectivity. If you plan to use SQL Authentication, it is strongly recommended that you create a database account with limited access to your database. (Both versions of authentication are demonstrated in the tutorials.) For more information on security, including how to create a limited access database account, see the SDK Fundamentals section of the Crystal Reports for Visual Studio 2005 documentation. Asp.net2.0水晶报表(CrystalReports)事例源码大全(C#) 这些例子实现了水晶报表的查看、柱状图显示、打印、导出、缩放等基本功能,如果想了解更多比如说利用DataSet方式、Push、Pull等模式需要自己更深一步的研究了 难得的Asp.net2.0水晶报表源码,请珍藏!

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧