我遇到了应该导致在iReport中显示或隐藏乐队的表达式的困难。如何将正确的表达式写入布尔值? (无法从布尔值转换为布尔值)
这些是我的变量:
Integer mainGroupInt = Integer.valueOf(5);
Integer subGroupInt = Integer.valueOf(5);
Boolean showDetailGroup = Boolean.valueOf(false);
的结果必须是一个Boolean
,所以我尝试了以下内容:
mainGroupInt.intValue() != 0 && subGroupInt.intValue() != 0)) || (mainGroupInt.intValue() != 0 && showDetailGroup)
这因此不能正常工作,我得到以下错误:
The expression of type boolean is boxed into Boolean
我正在推翻这一个,但我无法解决它。
感谢您的帮助。
所以...这个工程,但你希望它更优雅? – FrustratedWithFormsDesigner 2012-02-22 19:09:17
不,不幸的是,它不工作,我得到了错误更新在我的文章。 – adis 2012-02-22 19:12:22