简体   繁体   English

SSRS 2008-导出为pdf时,多个报告页面存在差异

[英]SSRS 2008 - Multiple report page discrepancies when exporting to pdf

I am creating a report using SSRS 2008 consisting of a page with a single tablix, a header, and a footer. 我正在使用SSRS 2008创建一个报告,该报告包含一个带有单个Tablix,页眉和页脚的页面。 As far as I'm concern, the report itself isn't that complex. 就我而言,报告本身并不复杂。 But when I tried to export it to PDF format for printing, several issues ensue: 但是,当我尝试将其导出为PDF格式进行打印时,出现了几个问题:

  • When using the expression ="Page " & Globals!PageNumber & " of " & Globals!TotalPages in a textbox in the header, the displayed TotalPage number is not equal to the actual total pages in the report. 在标题的文本框中使用表达式="Page " & Globals!PageNumber & " of " & Globals!TotalPages的表达式="Page " & Globals!PageNumber & " of " & Globals!TotalPages显示的TotalPage不等于报告中的实际总页数

  • The pages after the printed TotalPages in the report does not display the page header and footer anymore. 报告 已打印的TotalPages之后的页面不再显示页面页眉页脚 For example the actual total page number of the report is 50 but whats printed in the header is Page x of 42 ; 例如,报告的实际总页数是50,但是页眉中打印的是第x页,共42页 after page 42, the pages does not display the Header and Footer anymore 在第42页之后,这些页面不再显示页眉和页脚

  • The tablix applies pagebreaks at random pages eventhough there is no pagebreak condition to any group in the tablix nor on the tablix itself causing half of the page to be blank and the continuation is on the next page. 即使对tablix中的任何组都没有分页符条件,或者tablix本身上没有任何分页符条件,则tablix会在随机页面上应用分页符,从而导致一半的页面为空白,而下一页继续。

Does anyone know any fix or workaround on these issues? 有谁知道关于这些问题的任何修复或解决方法? I've searched high and low on the internet on how to fix these issues but I always arrive at dead end. 我在互联网上搜索过高低如何解决这些问题的方法,但我总是死胡同。 Please leave comments that you think can help, it will be greatly appreciated. 请留下您认为有帮助的评论,我们将不胜感激。 Thanks! 谢谢!

I've helped solve a similar problem a few weeks ago. 几周前,我已经帮助解决了类似的问题。

Sometimes, any errors in expressions or custom code has side-effects that cascades into the report layout (sometimes causing pagination anomalies, layout issues, etc.). 有时,表达式或自定义代码中的任何错误都有副作用,这些副作用会级联到报表布局中(有时会导致分页异常,布局问题等)。 Just check if your expressions are error free, or if there are any scenarios that can cause some expressions or custom code to have errors (like null references, etc). 只要检查您的表达式是否没有错误,或者是否存在任何可能导致某些表达式或自定义代码出现错误的情况(例如空引用等)。

Also, check if you are calling custom code in a hidden control. 另外,请检查是否在隐藏控件中调用自定义代码。 From experience with SSRS 2008, custom code inside a hidden control or table row produces side-effects on total page counts, although I've yet to verify if these side effects still happen on newer versions of SSRS (like SSRS 2008 R2). 根据SSRS 2008的经验,隐藏控件或表行中的自定义代码会对总页数产生副作用,尽管我尚未验证这些副作用是否仍会在较新版本的SSRS(例如SSRS 2008 R2)上发生。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM