kacheek Posted April 30, 2007 Share Posted April 30, 2007 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 Link to comment Share on other sites More sharing options...
kaunietiss Posted May 2, 2007 Share Posted May 2, 2007 and why this one didn't work for you? did you get any kind of error? Link to comment Share on other sites More sharing options...
kacheek Posted May 3, 2007 Author Share Posted May 3, 2007 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 BigDecimalPost edited by: kacheek, at: 2007/05/03 03:35 Link to comment Share on other sites More sharing options...
walmillard Posted May 8, 2007 Share Posted May 8, 2007 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? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now