我有两页的SSRS报告。当我将它导出为PDF时,由于它的宽度,它需要4页,其中第2和第4页显示了我从表格中的一个字段。我试图在报告属性中设置布局大小为宽度=18英寸,高度=8.5英寸。
它在一页PDF中给了我整个表格,但我仍然得到第2页和第4页空白。
我做的方法不对吗?我还能怎么摆脱这些空白页呢?
我有两页的SSRS报告。当我将它导出为PDF时,由于它的宽度,它需要4页,其中第2和第4页显示了我从表格中的一个字段。我试图在报告属性中设置布局大小为宽度=18英寸,高度=8.5英寸。
它在一页PDF中给了我整个表格,但我仍然得到第2页和第4页空白。
我做的方法不对吗?我还能怎么摆脱这些空白页呢?
当前回答
我刚刚减少了所有元素宽度小于8英寸,它正在被纠正, 我是用鼠标做的, 你的报告主体应该短于8英寸。
其他回答
对我来说,问题是SSRS故意对待你的空白,就好像你想让它得到尊重一样:
和空白一样,确保没有右边距。
我通过以下方法解决了这个问题。(使用最新版本的报表生成器)
步骤1)。进入“查看”选项卡 步骤2)。选中“属性”复选框 步骤3)。单击报告主体内部(它将更新属性选项卡中的值) 步骤4)。不要拿这里的宽度 步骤5)。右键单击报表外的灰色区域,然后单击报表属性 步骤6)。将你的左右边距加上你的身体宽度(如果它等于10,那么你的宽度为11) 步骤7)。保存
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.
在与这个问题斗争了几个小时后,我偶然发现了一个适合我的解决方案:
在SSDT(2012)中,我最初将页面设置/页面单位设置为厘米。当我把它改为英寸时,奇怪的是,我可以将我的报告导出为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!