Jump to content
Changes to the Jaspersoft community edition download ×

Insert a condition


Recommended Posts

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:




but i got problem with the insertion. i'm new in ireport.

If somebody can help me...



Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

This code compiles...


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 :
) && ! ( ($F{CALLING_PARTY}).length()>4 )






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...



Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...