如何将 SSRS 表拉伸到最近页面的末尾

发布于 2024-08-31 16:13:52 字数 564 浏览 6 评论 0原文

我似乎找不到任何人和我有同样问题的人,我觉得很难相信,因为这似乎应该是一个普遍的需求。关于问题...

我有一个非常标准的 SSRS 2005 发票报告,其中有一个标题、标题下方的一些地址、一个包含有关发票的行项目信息和页脚的表格。

我需要将表格拉伸到最近页面的末尾。例如,如果表格自然地在第二页的中间结束,因为这就是所有内容,那么我需要将该表格拉伸到页脚上方。同样,如果表格在第 8 页之后自然结束四行,我需要表格拉伸到第 8 页的末尾并停在页脚上方。

有没有办法让 SSRS 本身就可以做到这一点,而不需要做一些愚蠢的事情?

到目前为止,我已经尝试了各种疯狂的东西,包括传递报表行项目的所有文本,并在给定字体、粗体和字体大小的情况下确定文本的打印长度。这非常适合告诉我报表行项目将占用多少打印行,但现在我在处理换行的行时遇到了麻烦,因为换行之间的间距与正常报表行之间的间距不同。即使我能够设置填充以使间距相同,我也会遇到这样的问题:如果页面末尾的单元格具有将换行到下一页的文本,则整个单元格都会移动到下一页页面,这又把其他一切都抛掉了。

最重要的是,如果有人对如何可靠地将表格拉伸到最近页面的末尾有任何绝妙的想法,我将永远感激不已。

I can't seem to find anyone who has had the same problem as me, which I find hard to believe because it seems like it should be a common need. On to the problem...

I have a pretty standard SSRS 2005 Invoice report that has a header, a few address below the header, a table that contains the line item information about the invoice and a footer.

I have the need to stretch the table to the end of the nearest page. For example, if the table naturally ends in the middle of the second page because that's all the content there is, I need that table to stretch to just above the footer. Likewise, if the table naturally ends four lines after the 8th page, I need the table to stretch to the end of the 8th page and stop just above the footer.

Is there a way for SSRS to do that natively without doing some silly stuff?

So far, I've tried all kinds of crazy stuff including passing all the text of the report line items and determining the printed length of the text, given the font, boldness and font size. This works great at telling me how many printed lines my report line items will take up but now I'm having trouble with the lines that wrap in that the space between the wrapped lines is different than the space between the normal report lines. And even if I am able to set the padding to make the the spacing the same, I run into the problem that if a cell at the end of the page has text that will wrap to the next page, that entire cell moves to the next page, which throws everything else off again.

Bottom line, if anyone has any brilliant ideas on how to reliably stretch a table to the end of the nearest page, I would be forever grateful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文