简体   繁体   English

Pentaho Report Designer 5:Excel多表中的异常行为

[英]Pentaho Report Designer 5: strange behaviour in Excel multiple sheets

I'm making a report with PRD 5.1.0 Community Edition, and I'm trying to create an Excel output with multiple sheets. 我正在使用PRD 5.1.0 Community Edition进行报告,并且试图创建具有多个工作表的Excel输出。

All the data are already grouped by a column (the customer id in this case) so I've set the "pagebreak-after" value to "True" in the Group Footer. 所有数据已经​​按列分组(在这种情况下为客户ID),因此在组页脚中将“ pagebreak-after”值设置为“ True”。

In the Excel output it indeed prints the document with a single sheet per customer, problem is the related data from the second sheet onward starts from the last row of the previous sheet, leaving a lot of blank rows at the top. 在Excel输出中,确实每个客户只用一张纸打印文档,问题是从第二张纸开始的相关数据从上一张纸的最后一行开始,在顶部留了很多空白行。

For instance, if the data table in the first sheet ends in row 41, the table in the second sheet will start from row 42, leaving the previous 41 rows blank. 例如,如果第一张表中的数据表在第41行结束,则第二张表中的数据表将从第42行开始,而前41行为空白。

The problem appears only with Excel output: trying to print the report as a PDF output works fine. 该问题仅在Excel输出中出现:尝试将报告打印为PDF输出效果很好。

[DETAIL] Sadly, I cannot use a different version of PRD nor upgrade it. [详细信息]很遗憾,我无法使用其他版本的PRD也无法对其进行升级。

[I'm not voting this, keeping the question open if someone knows a cleaner way to achieve this.Still I'm posting what I've found if someone is having the same trouble]. (我没有投票,如果有人知道更干净的方法可以解决这个问题,我仍然会公开。如果有人遇到同样的麻烦,我仍然会发表我发现的内容)。

So I tried one of the working examples to see what mine was missing. 因此,我尝试了一个工作示例,以查看缺少的地雷。 It turns out page break won't work in Excel except when you have a subreport in you group header or group footer (even an empty one). 事实证明,分页符在Excel中不起作用,除非您在组页眉或组页脚中有一个子报表(甚至是一个空的)。

I don't know if it is a bug solved in more recent versions (we sadly have to stick with this version) or if there is a reason behind this behaviour. 我不知道这是不是在较新版本中解决的错误(很遗憾,我们必须坚持使用该版本),或者这种行为背后是否有原因。

In the meantime I found this workaround and now everything works fine :D 在此期间,我找到了解决方法,现在一切正常:D

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

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