微软SQL Server 2000 Reporting Services介绍

** 微软 ** ** SQL Server 2000 Reporting Services ** ** 介绍 ** ** **

** [ ** ** 摘要 ** ** ] ** 本文介绍了如何直接修改 .rdl 文件来实现报表 . 实际上 .NET 开发环境中的

报表设计器也只是对 .rdl 文件进行编辑 . ** **

** [ ** ** 关键字 ** ** ] ** Reporting Services,.NET Framework. DrillThrough,rdl 文件 ,rds 文件

n ** 如何将报表系统集成到系统中 **

Reporing Services 的帮助中提到:“有两种集成方式,通过 URL 访问或者利用 Web Service, 用 URL 的方式比较快捷,如果用 Web Service 就必须手工写一些代码 .” 具体步骤还需要详细阅读帮助 .

n ** 修改 .rdl ** ** 快速实现报表 **

在 .NET 开发环境中提供了 Report Designer 来开发报表,但对于初学者,建议最好要知道其根本的原理,如果用编辑器将 .rdl 打开就会发现该文件就是一个 XML 文件,如果安装了 Sample, 到文件目录 D:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\Samples\Reports 下就可以看到如下文件, AdventureWorks.rds, 该文件就是设置数据源的 XML 文件,用编辑打开看一下 ,


1<extension>SQL</extension>

// ** 表示数据源类型为 SQL **

1<connectstring>data source="(local)";initial catalog=AdventureWorks2000;integrated security=SSPI;persist security info=False</connectstring>

// ** 这里的 integrated security ** ** 表示认证方式,如果有用户和密码的话,应该把这一项去掉 . ** ** 如果要改变数据源的话,应该把 data source ** ** 和 initial catalog ** ** 分别修改一下 **

.rdl 文件也可以用编辑器打开这里选取 Employee Sales Summary.rdl 文件的一段做说明 :

 1<header>//  这一段对应报表中的标题, 
 2
 3<tablerows>
 4<tablerow>
 5<height>0.375in</height>
 6<tablecells>
 7<tablecell>
 8
 9…… 
10
11<value> **Current Month Order Summary** </value>//  在 **图片上可以看到这就是报表的标题!**
12
13……. 
14
15</tablecell></tablecells></tablerow></tablerows></header>
 1<details>//  这一段对应报表中的标题 
 2
 3<tablerows>
 4<tablerow>
 5<height>0.25in</height>
 6<tablecells>
 7<tablecell>
 8<reportitems>
 9<textbox name=" **OrderNumber** ">//  ** 在图片中可以看到  OrderNumber  ** ** 就是第一列的标题  !  ** ** 如果要修改的话,只要把名称修改一下就可以了!  **
10
11<style></style></textbox></reportitems></tablecell></tablecells></tablerow></tablerows></details>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus