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

how write if condition in IReport?


muneer

Recommended Posts

  • 2 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

hi im new to ireport but i hope this can help..

$F{YourFieldName} > 5000 ? doSomethingHere : ""

let me give you an example:

say u have a field name GROSS with type Double.if the value of gross is null the report would display 0.00 instead of null and if it is not null the report will display the value..here is how i do it:

 

$F{GROSS} == null ? new Double(0.00) : $F{GROSS}

 

hope this can help you!

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