简体   繁体   English

SSRS 2005 - 带矩阵和列表的打印报告每隔一页显示空白页

[英]SSRS 2005 - Printing report with matrix and a list gives blank pages every other page

I am using SQL Server Reporting Services 2005 (SSRS 2005) to build an A4 portrait report. 我正在使用SQL Server Reporting Services 2005(SSRS 2005)来构建A4纵向报告。 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. 我遇到的问题是,当在每个数据页之间将报表导出为PDF(或打印)时,我得到一个空白页面,其中只有页眉和页脚,没有数据。 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; InteractiveWidth(报告) - 8.5in; PageWidth (Report) - 21cm; PageWidth(报告) - 21cm; PageHeight (Report) - 29.7cm; PageHeight(报告) - 29.7cm; Left Margin (Report) - 0; 左边距(报告) - 0; Right Margin (Report) - 0; 右边保证金(报告) - 0; Top Margin (Report) - 0; 最高保证金(报告) - 0; Bottom Margin (Report) - 0; 底部保证金(报告) - 0;

The body width is 7.2 inches. 车身宽度为7.2英寸。

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) 矩阵包含2个固定列,并设置为使用列表中设置的以下分组表达式重复每增加5列:= 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). (但3,4或更多列会导致问题)。 And there is more than enough space for 5 columns and it would look really odd to print just 2! 并且有足够的空间容纳5列,打印只有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 蒂姆,谢谢你

I am the one who posted the original question from another PC... 我是从另一台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. 如果您需要澄清,请告诉我。

regarding cylc's answer: the problem does indeed have something to do w/the matrix being less than the report body width. 关于cylc的答案:问题确实有一些事情要做,因为矩阵小于报告体宽度。

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. 在读取了cyclc的响应后,我在最终列组外添加了另一个隐藏列,并扩展了其宽度,使矩阵宽度与报告宽度相匹配。 no more blank pages. 没有更多的空白页面。

anyone know if MS recognized this as an issue and is addressing it? 有谁知道MS是否认为这是一个问题而且正在解决它?

The problem might stem from your margins being set to 0. Have you tried setting margin values (0.5cm would be a reasonable value)? 问题可能源于您的边距设置为0.您是否尝试设置边距值(0.5厘米是一个合理的值)?

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. PS - 您不必以英寸和厘米的混合工作 - BIDS将允许您更改单位以匹配彼此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM