lisih Posted March 4, 2009 Share Posted March 4, 2009 Hi,I have two fields, that I want to concat in a string. The TextFieldExpression is$F{VORNAME}+" "+ $F{NACHNAME}If VORNAME is Null the field starts with a blank - which it shouldn't do... ;-)How do I "Trim" this textfield? Or do I have to solve this within the SQL?IThanks a lot in advance! Link to comment Share on other sites More sharing options...
yo1832 Posted March 4, 2009 Share Posted March 4, 2009 if expresion are string new String($F{VORNAME}).conact(" ").concat($F{NACHNAME}) if nay expresion is integer new String($F{VORNAME}.toString()).conact(" ").concat($F{NACHNAME}) Link to comment Share on other sites More sharing options...
yo1832 Posted March 4, 2009 Share Posted March 4, 2009 I have a error conact don't exist, is concat new String($F{VORNAME}).concat(" ").concat($F{NACHNAME}) new String($F{VORNAME}.toString()).concat(" ").concat($F{NACHNAME}) Link to comment Share on other sites More sharing options...
keats76 Posted March 4, 2009 Share Posted March 4, 2009 Try this: ($F{VORNAME} == null : "" : $F{VORNAME} + " ") + ($F{NACHNAME} == null : "" : $F{NACHNAME}) 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