Jump to content

IF statment: java.lang.Integer


jenkins

Recommended Posts

I have the following two fields/variables in my report:
$F{CostNeutral}: Field class: java.lang.Integer (0 or 1)
$V{persondays}: Field class: java.lang.Integer (calculates the difference between two dates)

I now want to enter a third field ($F{PD}: Field class: java.lang.Integer) with an if statement which should check the value in $F{CostNeutral} and then determine how to populate $F{PD}, i.e. with either "0" or "$V{persondays}". I have tried many variations of the following expression with no joy (still have to get up to speed on java!):

$F{CostNeutral}.equals( "1" ) ? "0" : "$V{persondays}"

Any help would be much appreciated!!

Link to comment
Share on other sites

  • Replies 2
  • 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...