如何避免 iReport 中合并单元格
有谁知道如何在导出到Excel时在一个单元格中显示字段?
我得到一些结果合并在两个单元格中,即使它们可以适合一个单元格,而另一个结果显示在一个单元格中。我不知道iReport如何决定如何显示其结果。我有一个问题,Excel 无法对合并单元格中的结果进行排序。
我尝试添加参数
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="net.sf.jasperreports.export.xls.collapse.row.span" value="true"/>
但没有帮助。
有什么建议吗?
谢谢, 森姆
Does anybody know how to display field in a one cell when exporting to excel?
I get some results merged in two cells even thought they could fit in one and another are displayed in one cell. I don't know how iReport decides how to display its results. I have a problem that excel can not sort results that are in merged cells.
I tried to add parameters
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="net.sf.jasperreports.export.xls.collapse.row.span" value="true"/>
but it didn't help.
Any suggestions?
Thanks,
Sime
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现扩大整个报告的宽度并将单元格移动到发生合并的区域的右侧可以清理它。当我再次运行报告时,发生合并的列的宽度减小为 0 并且为空。如果您不介意额外的列存在,因为它们几乎是不可见的,那么这个解决方案被确认是有效的。
I found that expanding the width of the entire report and shifting cells to the right of the area where the merge happens cleaned it up for me. The columns where the merge happened was reduced to 0 in width and empty when I ran the report again. If you don't mind the extra columns being there as they are all but invisible then this solution is confirmed to work.