Error while trying to bold a text field


Hi everyone, 

I'm trying to do conditional formating on a text field in the detail band by setting the extended properties ( of text field in jaspersoft studio v6.6.0,

My condition is like : $F{FieldName} == "ABC" ? true : false

It throws me an exception error  "java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String" from this i can inherit that there is some data type missmatch somewhere can someone could please help where it could be or if there is any mistake in my conditioning method.



alapatiaditya369's picture
Joined: May 31 2018 - 6:13am
Last seen: 1 year 8 months ago

1 Answer:


First of all, remember than is more "happy" to use equals to compare strings instead of "=="


Then, i tryed what you said and made it work. Just instead of returning true or false, return "True" or "False"

GonzaLinares's picture
Joined: Apr 17 2018 - 10:50am
Last seen: 1 year 7 months ago