如何隐藏在ireport上没有数据的表? [英] How do I hide a table that has no data on ireport?

查看:90
本文介绍了如何隐藏在ireport上没有数据的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何隐藏没有数据的表(不包含在布局中)?

How do I hide a table (not include in layout) that has no data?

推荐答案

如果表格在其自己的区域中,我通常要做的是在该区域中的条件仅当该对象中的任何对象显示数据时设置打印乐队有数据.说你的桌子是这样的:

If you have the table on its own band, what I typically do is set a print when condition on the band that only shows the data if any object in that band has data. Say your table is something like this:

item1 item2 item3

表达时的打印内容如下:

The print when expression would look something like this:

item1 != null || item2 != null || item3 != null

如果您指的是使用集合构建的子报表,那么我只是检查以确保集合不为空:

If you're referring to a subreport built using a collection, then I just check to make sure the collection isn't empty:

!subreportCollection.isEmpty()

在带状线上的条件隐藏数据时放入打印内容,并使报表折叠未使用的空间.

Putting the print when condition on the band line hides the data, and causes the report to collapse the unused space.

这篇关于如何隐藏在ireport上没有数据的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆