我有一个报告,其中我有三个mutliselect输入控件,我想在报告的底部显示所有输入值,为此我添加了文本字段,其条件如下: -
$P{p_project_location}==null ? "All" : $P{p_project_location}
$P{p_project_manager}==null ? "All" : $P{p_project_manager}
$P{p_project_phase}==null ? "All" : $P{p_project_phase}
如果我在没有选择任何参数值的情况下第一次运行报告,它会为所有三个输入控件显示“全部”,但是一旦我选择任何输入控件,其他输出控件就不显示“全部”。
project_location = [India]
project_manager = []
project_phase = []
我该如何解决这个问题?
答案 0 :(得分:1)
处理isEmpty可能性:
$P{p_project_location} == null? " 'All' " :
($P{p_project_location}.isEmpty() ? " 'All' ":
$P{p_project_location}
)
答案 1 :(得分:1)
试试这个: -
$P{p_project_location}.isEmpty() ? " 'All' ": $P{p_project_location}