muneer Posted March 24, 2009 Share Posted March 24, 2009 i made a report in iReport i want to write a condition on a field like when a_field amount > 5000 then print line in report else nothing Link to comment Share on other sites More sharing options...
prinsesajade Posted April 7, 2009 Share Posted April 7, 2009 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 More sharing options...
clarson Posted April 10, 2009 Share Posted April 10, 2009 Here is a simple java string that I use. ( $F{CLASS_ID}.equals($P{class_id}) ? null : $F{CLASS_ID} )( condition ? true : false ) -Cam Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now