grototo Posted August 7, 2014 Posted August 7, 2014 Hi folks, first of all, all apologies for my english. I'll try to to my best....Here is my issue : in a subreport, I want a variable to take the value, which is the sum of 2 BigDecimals.The problem is Jasper doesn't even insult me when I write this :Variable Total : $F{montantFraisRejetPacs004}.add( $F{montantFraisIndemnite} )The problem is that either montantFraisInitial or montantFraisComplementaire can be null.I've tried something like : ($F{montantFraisIndemnite} == null ? $F{montantFraisRejetPacs004} : $F{montantFraisRejetPacs004}.add($F{montantFraisIndemnite}))||($F{montantFraisRejetPacs004} == null ? $F{montantFraisIndemnite} : $F{montantFraisRejetPacs004}.add($F{montantFraisIndemnite}))in the variable expression from the subreport, but of course, the operator || is undefined for my argument types BigDecimal, BigDecimal. Does anyone have a solution to this, please?Thanks a lot, and best regards.Thomas
grototo Posted August 7, 2014 Author Posted August 7, 2014 Ok I solved it : (($F{montantFraisIndemnite} != null && $F{montantFraisRejetPacs004} != null) ? $F{montantFraisRejetPacs004}.add($F{montantFraisIndemnite}) : ($F{montantFraisIndemnite} == null ? $F{montantFraisRejetPacs004} : $F{montantFraisIndemnite}) )
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