I am experiencing difficulties with an expression that should result in showing or hiding a band in an iReport.
These are variables that I have:
Integer mainGroupInt = Integer.valueOf(5);
Integer subGroupInt = Integer.valueOf(5);
Boolean showDetailGroup = Boolean.valueOf(false);
The result must be a Boolean, so I tried the following:
mainGroupInt.intValue() != 0 && subGroupInt.intValue() != 0)) || (mainGroupInt.intValue() != 0 && showDetailGroup)
This is thus not working, I get the following error:
The expression of type boolean is boxed into Boolean
I’m overthinking this one but I cannot solve it.
Thanks for your help.
Are you looking for…
If not, I don’t understand your question. The above code returns a
Booleanrepresenting the value of thebooleanexpression. See Java Boolean.valueOf() and Boolean.booleanValue() docs.