2005 IR Help Posted August 23, 2006 Share Posted August 23, 2006 By: Manish Hatwalne - manish_hatwalne isBalnkWhenNull 2004-02-26 01:37 I have a textfield expression which is a combination of two fields. Say number and name. Now I want "number" to be blank when it is null. So I added this attribute to my textField tag. However I still get "null" when number is null. My expression is - <textFieldExpression class="java.lang.String"> $F{number} + " " + $F{streetnum}</textFieldExpression> How can I get this to print blank when number is null? TIA, - Manish By: David Lim - aberrant80 RE: isBalnkWhenNull 2004-02-26 02:52 assuming number is an object and that you mean "if number is null, print an empty string", how about: <textFieldExpression class="java.lang.String"> $F{number} + " == null ? "" : " +$F{Number} + " " + $F{streetnum} </textFieldExpression> 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