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

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

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


当前回答

在与这个问题斗争了几个小时后,我偶然发现了一个适合我的解决方案:

在SSDT(2012)中,我最初将页面设置/页面单位设置为厘米。当我把它改为英寸时,奇怪的是,我可以将我的报告导出为PDF,而不用让每一页都是空白的。

其他回答

在与这个问题斗争了几个小时后,我偶然发现了一个适合我的解决方案:

在SSDT(2012)中,我最初将页面设置/页面单位设置为厘米。当我把它改为英寸时,奇怪的是,我可以将我的报告导出为PDF,而不用让每一页都是空白的。

我已经成功地使用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

If your report includes a subreport, the width of the subreport could push the boundaries of the body if subreport and hierarchy are allowed to grow. I had a similar problem arise with a subreport that could be placed in a cell (spanning 2 columns). It looked like the span could contain it in the designer and it rendered fine in a winform or a browser and, originally, it could generate printer output (or pdf file) without spilling over onto excess pages. Then, after changing some other column widths (and without exceeding the body width plus margins), the winform and browser renderings looked still looked fine but when the output (printer or pdf) was generated, it grew past the margins and wrote the right side of each page as a 2nd (4th, etc.) page. I could eliminate my problem by increasing colspan where the subreport was placed. Whether or not you're using subreports, if you have page spillover and your body design fits within the margins of the page, look for something allowed to grow that pushes the width of the body out.

你有没有看一下你的报告右边是否有空白处?如果是这样,您可以将它拖回报表的末尾,然后将报表背景拖回相同的位置。

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

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