Combined field as null
Posted on March 14, 2023 at 8:11am
I have combined metadata in JasperSoft Studio this way in a text field : $F{usrtestsequence} + " " + $F{title}.
I have checked the box to display as empty instead of null if the data is absent, but it still displays usrtestsequence as null when title exists, as displayed below.

How can I ensure that when no usrtestsequence is defined, it will be absent even if the combined metadata exists?
Joined: Mar 8 2023 - 12:32pm
Last seen: 3 days 6 hours ago
Posted on March 14, 2023 at 10:24am
Found it. I replaced my text field's content with ($F{usrtestsequence} != null ? $F{usrtestsequence}: "") + " " + $F{title}($F{usrtestsequence} != null ? $F{usrtestsequence}: "") + " " + $F{title}.
Joined: Mar 8 2023 - 12:32pm
Last seen: 3 days 6 hours ago
Found it. I replaced my text field's content with ($F{usrtestsequence} != null ? $F{usrtestsequence}: "") + " " + $F{title}($F{usrtestsequence} != null ? $F{usrtestsequence}: "") + " " + $F{title}.