pawe84 Posted May 23 Share Posted May 23 I have in my report a text field where the name and address is shown in this way: $F{Customer Name 1} +"\n"+ $F{Customer Name 2} +"\n"+ $F{Address} +"\n"+"\n"+ $F{Country} How I can remove a blank line when $F{Customer Name 2} is blank? Inside the database the field is not null it's just empty/blank. I tried the following condition but it seems that it doesn't work. In my report preview I still got the blank line if Customer Name 2 is blank. $F{Customer Name 2} ==" " ? $F{Customer Name 1} +"\n"+ $F{Address} +"\n"+"\n"+ $F{Country} : $F{Customer Name 1} +"\n"+ $F{Customer Name 2} +"\n"+ $F{Address} +"\n"+"\n"+ $F{Country} I already setup the text field "Remove Line When Blank" but this also doesn't work. Even to check field is not null doesn't work $F{Customer Name 2} == null ? Any ideas what I did wrong? Link to comment Share on other sites More sharing options...
shreekrishna.shankhwar Posted May 24 Share Posted May 24 Tried this way and use markup as styled $F{Customer Name 1}==null ? "" : $F{Customer Name 1}+"\n" Link to comment Share on other sites More sharing options...
Solution pawe84 Posted May 27 Author Solution Share Posted May 27 I solved it now. At first I created two variables and then used the following condition: !($F{Sell-to Customer Name 2} == null || $F{Sell-to Customer Name 2}.trim().isEmpty())?$V{addr_displ2} :$V{addr_displ1} 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