print when expression

hi.

i have a list of amount in the report. i want the report to show only those with total net amount <> 0 based on report grouping.
i tried this syntax --> new java.lang.Boolean($V{TOTAL_NET}.intValue() != 0) at $F{NET} but it didnt work.
wat is the right syntax to use? or is there any other way to do? your help is very much appreciated.
Post edited by: kacheek, at: 2007/04/30 10:01
kacheek's picture
227
Joined: Nov 8 2006 - 12:02pm
Last seen: 16 years 10 months ago

3 Answers:

and why this one didn't work for you? did you get any kind of error?
kaunietiss's picture
Joined: Aug 3 2006 - 7:28pm
Last seen: 17 years 1 month ago
it shows no error message.
i have $F{NET} figures like 1.00, 2.34, (5.09), (123.50), etc. which is grouped by client name. however, when the amount is sum up according to the grouping, the $V{TOTAL_NET} will be 0, and some will be 12.94, (345.21), etc.
whenever i put this syntax new java.lang.Boolean($V{TOTAL_NET}.intValue() != 0) at $F{NET}, 99% of the result will appear. and the 1% that doesnt appear has the negative value eg (34,532.94), (2,586.21).
whereas if my syntax is new java.lang.Boolean($V{TOTAL_NET}.intValue() == 0), all $F{NET} will be null.
so what is wrong with it??

btw, the $F{NET} and $V{TOTAL_NET} is defined as BigDecimal
Post edited by: kacheek, at: 2007/05/03 03:35
kacheek's picture
227
Joined: Nov 8 2006 - 12:02pm
Last seen: 16 years 10 months ago
try inline if statement... like this:

$V{TOTAL_NET}.intValue() > 0?Boolean.TRUE:Boolean.FALSE

however the .intValue() will ignore the decimal part of the field, so perhaps you should use

.doubleValue()

instead?
walmillard's picture
Joined: Jul 30 2006 - 11:53am
Last seen: 17 years 2 months ago
Feedback
randomness