Q:

How to write only "if" condition in jasper report? 

Say I have 2 strings "Jack" & "Jones".  I print ""jack" but "Jones" will be printed if some condition gets true
Like 
"Jack"
if(condition)
+ "& Jones". 

In jasper
<![ CDATA[ 
                      "Jack" + ($P{condition}.equals(Boolean. TRUE))
                                                " & Jones" 
 ]]>

Can you help me with the syntax for it? 

A:

Try this:
 "Jack" + ($P{condition}.equals(Boolean. TRUE)? " &  Jones" : "")

