Gefrey Posted April 3, 2007 Share Posted April 3, 2007 Hello i'm french so sorry for my english.I'm trying to add a condition in an expression.the expression is:new Boolean((($F{TYPE}.equals("T2T")))?true:(($F{INTERNAL_PARTY}.substring(0,3)).startsWith("9660") && $F{CALLING_PARTY}.length()>4)?true:($F{INTERNAL_PARTY}.matches("[\d]{4,4}"))?true:false) and i want to delete all the field that have more of 4 characters thanks to this condition: $F{CALLING_PARTY}).length()>4 but i got problem with the insertion. i'm new in ireport.If somebody can help me...ThanksGeoffrey Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted April 4, 2007 Share Posted April 4, 2007 This code compiles... Code:new Boolean( ( ($F{TYPE}.equals("T2T"«»)) ? true : ( (($F{INTERNAL_PARTY}.substring(0,3)).startsWith("9660"«») && $F{CALLING_PARTY}.length()>4 ) ? true : ( ( $F{INTERNAL_PARTY}.matches("something"«») ) ? true : false ) ) ) && ! ( ($F{CALLING_PARTY}).length()>4 ) ) ...but Code:[code]$F{INTERNAL_PARTY}.substring(0,3)).startsWith("9660"«») is always FALSE; "[d]{4,4}" is not a valid java string $F{CALLING_PARTY}.length()>4 is required TRUE AND FALSE at the same time... Giulio 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