Jump to content
Changes to the Jaspersoft community edition download ×

evaluate binary field with PrintWhenExpression


waynes

Recommended Posts

I'm trying to use "Print When Expression" to evaluate a binary field, ie TINYINT(1) with values 0 or 1.

 

Without the PrintWhenExpression, the fields display in the report as either true or false.

I only want to display this field if the value is 1 ie true.

 

When I use either of these expressions :

 

new Boolean($F{StandIn}.equals("true"))

new Boolean($F{StandIn}.equals("1"))

 

the report builds, but nothing is printed (ie neither true or false).

 

Removing the quotes causes an error.

Replacing .equals with .booleanValue() causes an error.

 

"The method booleanValue() in the type Boolean is not applicable for the arguments (boolean)"

 

How can I evaluate a boolean value?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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