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

concat and NULL


babarincairo

Recommended Posts

Hi,

 

I have a problem with concatenation of two strings (from query) in a textfield.

 

I want to concat string A and B with a " - " between them. The "-" is present only if B is not NULL.

 

I use the following expression in the textfield :

 

Code:

(!($F{A}.equals(null)) ? $F{A} : ""«») +
(!($F{B}.equals(null)) ? " - " + $F{B} : ""«»)

 

But it doesn't work. If B is NULL, nothing is printed (normally A must be printed).

 

Can you help me ?

Thanks

Post edited by: babarincairo, at: 2006/11/07 08:25

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

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