blank when null in text field

0
Hi,

I'm using iReport 1.2.8 and have an issue concerning text field with concatenated fields with styled text (using underline for query fields).
If the "Blank when null" is checked and its contains static text inside the text field the database fields ($F{}) will return null (if the field has no value).

I could use a NVL(test,' '), but the space will be underlined. Is there a way to avoid this problem?

Regards
Ole Henrik
olehenrik's picture
Joined: Feb 15 2007 - 10:08pm
Last seen: 12 years 7 months ago

2 Answers:

0
You can try something like this in your field expression:

("Your static text "+(($F{field}!=null)?$F{field}:""))

Or, if you don't want your static text to be visible when the field is null, try putting $F{field}!=null in your "Print when expression".
Pedja's picture
152
Joined: Oct 24 2007 - 6:31pm
Last seen: 11 years 11 months ago
0
This worked perfectly!

Thank you very much!

Regards
Ole Henrik
olehenrik's picture
Joined: Feb 15 2007 - 10:08pm
Last seen: 12 years 7 months ago
Feedback