SSRS 2005 - 打印带有矩阵和列表的报告,每隔一页给出空白页
我正在使用 SQL Server Reporting Services 2005 (SSRS 2005) 构建 A4 纵向报告。该报告包含一些文本数据和一个放置在列表上的矩阵,以便创建水平表格效果(其中列代表各种重复字段)。我遇到的问题是,当在每个数据页之间将报告导出为 PDF(或打印)时,我得到一个空白页,只有页眉和页脚,没有数据。我读到这可能是由于正文+左+右页边距大于报告宽度。然而,情况并非如此,我有以下相关设置:
InteractiveWidth (Report) - 8.5in; 页宽(报告)- 21 厘米; 页面高度(报告)- 29.7 厘米; 左边距(报告)- 0; 右边距(报告)- 0; 上边距(报告)- 0; 下边距(报告)- 0;
机身宽度为 7.2 英寸。
该矩阵包含 2 个固定列,并设置为使用列表上设置的以下分组表达式每隔 5 列重复一次: =Ceiling(RowNumber(Nothing)/5)
我注意到,如果我将该矩阵更改为水平每两列重复一次,则报告将正确打印,没有空白页。 (但是 3,4 或更多列会导致问题)。而且有足够的空间容纳 5 列,但只打印 2 列看起来真的很奇怪!所以,我认为列表/矩阵中的某些内容导致了问题,但不知道到底是什么!
任何帮助将不胜感激! 预先感谢, 蒂姆
I am using SQL Server Reporting Services 2005 (SSRS 2005) to build an A4 portrait report. This report contains some text data and a matrix placed on a list so a horizontal table effect is created (with the columns representing the various repeating fields). The problem I am encountering is that, when exporting the report to PDF (or printing it) between each data page, I get a blank page with just the header and the footer and no data. I have read that this may be due to the body + left + right margins being greater than the report width. However, this is not the case and I have the following relevant settings:
InteractiveWidth (Report) - 8.5in;
PageWidth (Report) - 21cm;
PageHeight (Report) - 29.7cm;
Left Margin (Report) - 0;
Right Margin (Report) - 0;
Top Margin (Report) - 0;
Bottom Margin (Report) - 0;
The body width is 7.2 inches.
The matrix contains 2 fixed columns and is set to repeat every additional 5 columns using the following grouping expression set on the list:
=Ceiling(RowNumber(Nothing)/5)
What I noticed is if I change that matrix to repeat every 2 columns horizontally, the report is printed properly, with no blank pages. (But 3,4, or more columns leads to the problem). And there is more than enough space for 5 columns and it would look really odd to print just 2! So, I think something in the list/matrix is causing the problem, but don't know exactly what!
Any help would be greatly appreciated!
Thanks in avance,
Tim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我是从另一台电脑发布原始问题的人...
解决方案是将列表(包含矩阵)缩短到矩阵的宽度,因为列表有效地填充并给出了空白页。
一旦我将列表缩短到矩阵的宽度,其他一些报告项目就会被推出页面(注意哪些项目被淘汰的一个有用技巧可能是将报告项目的背景着色为红色),但后来我通过将所有内容放置在矩形中并将矩形的起点设置为矩阵左侧的点来解决这个问题,这样它就不会被推出。
谢谢,
蒂姆
I am the one who posted the original question from another PC...
The solution was to shorten the list (that contains the matrix) to the width of the matrix as the list was effectively padding and giving the blank page.
Once I shortened the list to the width of the matrix, some other report items were being pushed out of the page (a useful trick to notice which items go out may be to colour the background of the report items in, say, red), but then this I resolved by placing everything in rectangles and setting the start of the rectangle to a point to the left of the matrix so that it does not get pushed out.
Thanks,
Tim
我有同样的问题,我认为正在发生的事情是您的报告正文大于报告设计器中矩阵的大小。设计器中的矩阵和正文之间的空白区域是导致空白页面的原因。不幸的是,我现在也在尝试解决这个问题。
现在为了解决这个问题,报表设计器中我的主体宽度就是矩阵的宽度。
希望这些信息有点帮助。如果您需要澄清,请告诉我。
I have the same problem and what I think is happening is that your body of the report is larger than the size of the matrix in the report designer. That empty space between the matrix in the designer and the body is what is causing the blank page. Unfortunately I am trying to fix that right now as well.
To get around it right now, the width of my body in the report designer is the width of the matrix.
Hope this information was a bit helpful. If you need clarification, let me know.
关于 cylc 的回答:问题确实与矩阵小于报告正文宽度有关。
由于我的矩阵小于页眉和页脚中的内容,因此我需要另一种解决方法。阅读 cyclc 的响应后,我在最终列组之外添加了另一个隐藏列,并扩展了其宽度,使矩阵宽度与报告宽度相匹配。不再有空白页。
有人知道微软是否认识到这是一个问题并正在解决它?
regarding cylc's answer: the problem does indeed have something to do w/the matrix being less than the report body width.
since my matrix is smaller than the content in my header and footer, i needed another workaround. after reading cyclc's response, i added another hidden column outside the final column group and expanded its width such that the matrix width matched the report width. no more blank pages.
anyone know if MS recognized this as an issue and is addressing it?
问题可能源于您的边距设置为 0。您是否尝试过设置边距值(0.5 厘米是一个合理的值)?
PS - 您不必混合使用英寸和厘米 - BIDS 将允许您更改单位以相互匹配。
The problem might stem from your margins being set to 0. Have you tried setting margin values (0.5cm would be a reasonable value)?
PS - you don't have to work in a mixture of inches and centimeters - BIDS will allow you to change the units to match one another.