ssrs 2008 r2 pdf 空白页
我有一个带有动态宽度列表的报告,当导出为 pdf 时,每隔一页都是空白的。我按照此处给出的说明,尽我所能地挤压一切——它起作用了。不过,我也有页脚,其中有水平线,该水平线应贯穿整个页面宽度。如果我把它写得很长,那么每隔一页就会空白,如果我把它写得很短,它就会保持那么短。另外假设我需要在页面的最右上角有文本框,这又会使 pdf 中的空白页面出现。有什么办法解决这个问题吗?
I have report with dynamic-width list which when exported to pdf has every second page blank. I followed instructions given here, squeezed everything as hard as I could - and it worked. However I also have footer inside which I have horizontal line that should continue through whole page width. If I make it long I have every second page blank, if I make it short - it stays that short. Also suppose I need to have textbox at the far right corner of a page, which again would make blank pages in pdf to appear. Is there any solution to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现对于准确诊断 SSRS 生成空白页面的原因有用的一件事是将报表(或报表元素)的背景设置为非白色。再次生成报告,然后您通常可以看到溢出到另一个页面的内容。您通常可以弄清楚 SSRS 正在做什么,并相应地调整您的报告。
One thing I have found useful to diagnose exactly why SSRS is generating blank pages, is to set the background of the report (or report elements) to a non-white color. Generate the report again, then you can usually see what is being spilt over into another page. You can usually figure out what SSRS is doing, and tweak your report accordingly.
将报表属性
ConsumeContainerWhitespace
设置为True
。我相信默认值是 false,因此如果您没有想到在数据集中使用ltrim(rtrim())
(我经常忘记这样做),那么空白可能是导致它的原因。Set the report property
ConsumeContainerWhitespace
toTrue
. I believe the default is false, so if you didn't think toltrim(rtrim())
in your dataset, something I often forget to do, then the whitespace could be causing it.对于线条,如果只是将页脚与报表正文分开,请尝试选择整个页脚行并将 BorderStyle-Top 属性设置为 Solid,而不是使用线条。
对于文本框,它必须完全在页面尺寸内,否则您将得到第二个大部分空白的页面。左边距 + 右边距 + 报表宽度 <= 页面宽度。在我们的一台打印机上,这仍然不够,因此我们必须将右边距再减少 0.05 厘米(因此是 0.45 厘米,而不是应有的 0.5 厘米),以停止每隔一页出现空白页。
For the line, if it is simply to separate the footer from the body of the report, try selecting the entire footer row and set the BorderStyle-Top property to Solid instead of having a line.
For the text box, it has to be entirely within the page dimensions or you will get a second mostly blank page. Left margin + right margin + report width <= page width. On one of our printers this still isn't enough so we have to reduce the right margin by another 0.05cm more (so 0.45cm instead of 0.5cm which it should be) to stop getting blank pages every second page.