Jump to content
We've recently updated our Privacy Statement, available here ×

If and else statements


2004 IR Help

Recommended Posts

By: Paul - psrat

If and else statements

2004-07-22 08:47

I have the following textfield, but I want to add a condition to it.

 

new DecimalFormat("#,##0.00").format($F{EstimatedCost}.doubleValue())

 

I want to say if $F{FcEstimatedCost} is null

then $F{EstimatedCost}

else $F{FcEstimatedCost}

 

how can I build this into my current textfield - the fields are java.lang.string

 

Thanks Paul.

 

 

 

 

By: Alin Vaida - alinv

RE: If and else statements

2004-07-22 13:26

new Double($F{FcEstimatedCost} == null ? $F{EstimatedCost} : $F{FcEstimatedCost})

 

Also, you can use the formatting field provided by iReport.

 

 

 

 

By: frassy - frassyman

RE: If and else statements

2004-07-23 02:24

if you have more than one if statement how do you write then?

 

 

 

 

By: frassy - frassyman

RE: If and else statements

2004-07-23 02:27

sorry, just added an : statement :)

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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