我有两页的SSRS报告。当我将它导出为PDF时,由于它的宽度,它需要4页,其中第2和第4页显示了我从表格中的一个字段。我试图在报告属性中设置布局大小为宽度=18英寸,高度=8.5英寸。

它在一页PDF中给了我整个表格,但我仍然得到第2页和第4页空白。

我做的方法不对吗?我还能怎么摆脱这些空白页呢?


当前回答

在编辑SSRS文档时,最好先在设计面上(Visual Studio 2012显示,但可以在其他版本中完成)进行计算。

下面红圈内的数字对应以下步骤:

In the design surface, sometimes the editor will create a page which is larger than the actual controls; hence the ghost area being printed. Resize to the controls. Visually look at the width/height and see if you can't bring in the page on the design surface to size it to the space actually needed by the controls and no more. Then try to create a PDF and see if that fixes it. If #3 does not resolve the issue, then there are controls requiring too much of the actual page size and going over in either length/width. So one will need to make the size of the controls smaller to accommodate a smaller page size.


此外,在某些情况下,可以通过将ConsumeContainerWhitespace设置为true来更改报表页面的属性,从而自动使用这些空间。

其他回答

在报告(myReport.rdlc)的属性选项卡上,将“Keep Together”属性更改为False。我一直在这个问题上挣扎了一段时间,这似乎解决了我的问题。

我已经成功地使用pdftk删除了我不想要/不需要的pdf页面。你可以在这里下载这个程序

您可以尝试以下方法。从这里举个例子

从in1.pdf中删除“page 13”以创建out1.pdf PDFTK in.pdf cat 1-12 14端输出out1.pdf

or:

pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf

I have worked with SSRS for over 10 years and the answers above are the go to answers. BUT. If nothing works, and you are completely stuffed....remove items from the report until the problem goes away. Once you have identified which row or report item is causing the problem, put it inside a rectangle container. That's it. Has helped us many many times! Extra pages are mostly caused by report items flowing over the right margin. When all else fails, putting things inside a rectangle or an empty rectangle to the right of an item, can stop this from happening. Good luck out there!

我通过以下方法解决了这个问题。(使用最新版本的报表生成器)

步骤1)。进入“查看”选项卡 步骤2)。选中“属性”复选框 步骤3)。单击报告主体内部(它将更新属性选项卡中的值) 步骤4)。不要拿这里的宽度 步骤5)。右键单击报表外的灰色区域,然后单击报表属性 步骤6)。将你的左右边距加上你的身体宽度(如果它等于10,那么你的宽度为11) 步骤7)。保存

如果来自SSRS的页面为空白,则需要调整报表布局。这比通过运行输出和后处理来修复布局问题的副作用要有效得多。

SSRS在突破边界方面非常挑剔。通过调整报表上的文本框或其他控件,很容易意外地扩大/拉长报表。仔细检查报表表面的宽度和高度属性,并尽可能地挤压它们。注意大的页眉和页脚。