1. 如何去掉由SSRS导出PDF中空白页的问题
原因:Body/Page Footer/Page Header中的控件(如Text Box,Table, Matrix等)与Report的右边界有空白,这种情况下SSRS会自动将此空白加到生成的PDF中,从而导致出现PDF空白页。
解决方法:将控件的宽度设置(或拖拽)成与Report的宽度一致
可以从Properties选择Report/Body/Page Footer/Page Header的查看PageSize/Size/Width等属性
2. 控件(如Text Box)由于文本过长等原因导致宽度大于Table/Matrix等控件
,进而无法保持Table/Matrix等控件与Report的宽度一致。这种情况下,可以通过增加一个隐藏列在Table/Matrix等控件中,并且设置(或拖拽)隐藏列的宽度来保证控件与Report的宽度一致。这样做不会导致显示列的宽度变化,也可以消除PDF空白页的问题。
3. 隐藏Matrix列
如果是Row Groups的列,当选中此列,右键会发现Column Visibility选项是置灰不可用的,用其它方式hide列的话,会导致出现空白列。
解决方法:在Column Groups中添加此列的分组,并且重新从DataSet中拖入此列到Matrix中,然后选中此列右键选择Column Visibility选项
4. 设置Table/Matrix隔行不同背景色
Table BackgroundColor Expression:
=IIf(RowNumber(Nothing) Mod 2, "PaleGreen", "White")
Matrix:
a) 先add一个Column Group 如下图:
b) 设置Group by: 1
c) 设置 Expression:
=IIf(RunningValue(Fields!Client.Value, CountDistinct, Nothing) Mod 2 = 0,"PaleGreen","White")
d) 设定需要变色的行BackgroundColor Expression:
=ReportItems!running_color.Value
参见http://blogs.msdn.com/b/chrishays/archive/2004/08/30/greenbarmatrix.aspx
5. 得到当前登录用户的ID
User!UserID
6.SSRS不能使用存储过程OUTPUT参数值,如果需要使用返回参数可以放入结果集返回。
参见http://www.purplefrogsystems.com/blog/2008/08/use-stored-procedure-output-parameters-in-ssrs/
7. column排序
a) Column Groups中,点击右键选择Group Properties...
b) 选择Sorting Tab, 选择Sort by 列 及Order排序
8.
Add total for each Group
In “Row Groups”,
select child group to add total, then hide the parent group if not show
it.
e.g.
9.
Drill down for report
In “Row Groups”,
select “Group Properties” on one group, set property as below:
参见:http://www.mssqltips.com/sqlservertip/1329/drill-down-techniques-in-ssrs-with-the-visibility-property/
10.
Export report into
multiple work sheets in excel
In “Row Groups”,
select the Group that has the page breaks, set property as below:
The “PageName” will be show as sheet name in excel.
Notice:
Above is a new feature of SSRS 2008 R2.
参见:http://www.bidn.com/blogs/bretupdegraff/bidn-blog/234/new-features-of-ssrs-2008-r2-part-1-naming-excel-sheets-when-exporting-reports
11. Matrix :Repeat header columns on each page
选中需要repeat行,然后set by below:
12. Attempted to divide by zero
In general, you want a pattern like this to avoid division by zero:
=iif(B=0, 0, A / iif(B=0, 1, B))
You could also define a generic DivideXByY function in the custom code
section of the report that uses IF-ELSE-ENDIF statements (instead of the
IIF function call) to perform the division and avoid the DivisionByZero
exception.
参见:http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/cc8de00b-e131-45ab-b4a0-a6a865489d22/
- 大小: 13.3 KB
- 大小: 28.6 KB
- 大小: 17.1 KB
- 大小: 26.5 KB
- 大小: 30.6 KB
- 大小: 38.9 KB
分享到:
相关推荐
SSRS报表服务笔记及总结,很有总结性的笔记
全实战经验记录从技术选型到如何搭建企业数据平台bi。内容见目录: 开发方案选择 九大数据仓库方案特点 数据仓库方案选择 开发环境配置 安装配置前准备 软件准备 硬件准备 安装配置 数据库安装 VS安装 SSDT安装 ...
SSRS技巧及实例(持续更新) 分为3部分。 1.开发环境说明(使用Excel作为数据库,代码直接运行) 2.小技巧: 2.1.文字下调到底部 2.2.固定表头 2.3.单元格显示双横线 3.实例: 3.1.使用分组Group属性实现基于父子...
[Packt Publishing] Dynamics AX SSRS 报表开发教程 (英文版) [Packt Publishing] Developing SSRS Reports for Dynamics AX (E-Book) ☆ 图书概要:☆ A step-by-step guide to Microsoft Dynamics AX 2012 ...
本文档简述了ssrs的详细开发步骤,通过它,你可以完成ssrs的基本简单报表开发,是快速上手的好文档。相信哥。
详细教程,教你如何利用SSRS创建基本表报表
数据库ssrs报表入门的简单实例,帮助入门
微软ERP, Dynamic AX 在开发SSRS report时,条形码开发的详细介绍,包含了demo代码
SSRS技巧及实例(持续更新) 分为3部分。 1.开发环境说明(使用Excel作为数据库,代码直接运行) 2.小技巧 3.实例: 3.1.使用分组Group属性实现基于父子递归关系的汇总报表 3.2.SSRS使用字体实现Barcode 3.3.SSRS...
好像是微软的介绍文档,初学可以看一下 概括的介绍了什么是SSRS,以及其作用
通过图文的方式,使你学起来更加轻松和方便。SSRS项目的搭建,发布服务器的部署,以及表格的样式学习
SQL Server Reporting Services 2008 (SSRS 2008)是基于服务器(Server-based)的企业级报表平台,其中包含的开发以及管理元件都是为了提供报表生命周期各阶段所需的功能与服务。
非常详细的一个SSRS文档,强烈推荐!!! MS SQL Server报表服务入门文档 一、安装报表服务 二、报表服务配置管理器 三、创建报表 1. 使用报表向导新建报表 2. 使用一般方法创建报表 3. 创建报表模型项目 a. ...
SSRS 2012 Metro UI 高端报表开发技巧讲解,比较系统,值得学习
SSRS 报表作为微软 BI 体系中重要的前端展现工具无论从难度上和实用性上来看,都是优选的入门课程。
SQL Server Reporting_Service报表集成解决方案
SSAS&SSRS.rar,包含SQL_Server_2005_Analysis_Services_教程、SQL Server 2008 Reporting Services 动手实验操作动手实验两个文档
SSRS-查询条件为空,查询所有数据,否者查询符合条件的数据 解决办法
SSRS:动态表头的Matrix实现,Blog原文:http://blog.csdn.net/hery2002/article/details/45743057