Jump to content

Conditional Formatting


swelch

Recommended Posts

Hello. I have a report with fields holding numeric data, namely a 0 for false and a 1 for true. I would like to display the result as a check box but this looks difficult so the other option would be to have the report show a 'Green' box for a 1 and a 'red' box for a 0. How is this done easily?

 

I have tried adding a conditional expression '$F {Filed_Name}.equals('1') but the system does not like either '1' or "1".

Any ideas?

 

Kind Regards,

S Welch

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I find it's down to type casting. by putting the 1 in quotes you're trying to say it's a String when you want it to be a number. Try either not having any quotes at all or casting it properly with

$F {Filed_Name}.equals(new BigDecimal(1))

or

$F {Filed_Name}.equals(new Integer(1))

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