Variable Expression

I'm trying to configure variable expression in ireport , I want to write function to calculate 2 things Gross and Net TEU . 

Variable 1 (Gross)

For Gross I have two parameters Dwell Days and Equipment ISO Group. I trying to get sum of this two things , if Equipment ISO Group value starts with 2 ( Dwell Days + 1) * 1 and if   Equipment ISO Group value starts with 4 ( Dwell Days + 1) * 2 .  I need sum of  this two IF's . I wrote expression but it's not correct : 

($F{EquipmentISOGroup} = 2*? $F{DwellDays}+1)+($F{EquipmentISOGroup} = 4*? ($F{DwellDays}+1)*2)

Variable 2 (Net)

For Net I have 3 parameters Freight Kind, Dwell Days and Equipment ISO Group. If  Freight Kind is "FCL" and if Equipment ISO Group value starts with 2 ( Dwell Days -1) * 1 and if   Equipment ISO Group value starts with 4 

( Dwell Days -1) * 2 it's for FCL. If  Freight Kind is "Empty" and if Equipment ISO Group value starts with 2 ( Dwell Days -4) * 1 and if   Equipment ISO Group value starts with 4 

( Dwell Days -4) * 2  Its for Empty.

($F{FreightKind} = "FCL"? ($F{EquipmentISOGroup} = 2*? $F{DwellDays}-1)+($F{EquipmentISOGroup} = 4*? ($F{DwellDays}-1)*2))+($F{FreightKind} = "Empty"? ($F{EquipmentISOGroup} = 2*? $F{DwellDays}-4)+($F{EquipmentISOGroup} = 4*? ($F{DwellDays}-4)*2))

Please help to write right variable expression.

gio.jamburia's picture
Joined: Feb 21 2019 - 12:23am
Last seen: 2 years 5 months ago

0 Answers:

No answers yet
Feedback
randomness