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

If else for 2 fields


dbereza2009

Recommended Posts

Hello.

I try to combain 2 field with some conditions by expression text and put them into one cell.

 ($F{kindobjbu} == null ? "": $F{kindobjbu}) +
($F{kindflat} == 1 ? 
"Type_1" :
$F{kindflat} == 2 ?
"Type_2" :
$F{kindflat}== null ? "" : 
"")

The issue is that for first field ($F{kindobjbu}) report shows Null but not the blank "", like I made it in expression. Where is the problem? I try in other different ways but not succed. 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I found solution 
($F{kindobjbu}== null ? " ": $F{kindobjbu}) +

($F{kindflat}== null ? " ": $F{kindflat}== 1 ? "Type1": $F{kindflat}== 2 ? "type2": $F{kindflat}) 
It's work correct.

Also put this expression into variables. So I can filter values on this coloumn.
Done!

Link to comment
Share on other sites

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