2006 IR Open Dicussion Posted September 5, 2006 Posted September 5, 2006 By: Nick - nick_nz conditional field display 2006-02-27 12:38 I have a simple report - a phone list - where people have several phone numbers. I want to display the mobile number if present, otherwise display the land line. These are two seperate fields in the DB. What is the best way to do this? By: Josh - wildbrows RE: conditional field display 2006-02-27 13:14 You will want to use the java ?: operator. For the usage, see here: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/other.html Basically, you will want your variable or textfield expression to look something like this: $F{mobile_number} == null ? $F{land_line} : $F{mobile_number} That basically says if the mobile number field is null, then return the land line field, otherwise return the mobile number field
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