ksj2805 Posted August 20, 2019 Share Posted August 20, 2019 I'm trying to replace null value to '-' value however i can't find the way of doing this.i googled and found the anwser to using (F{fieldName} == null ? '-' : F{fieldName} ) function but it doesn't work. Link to comment Share on other sites More sharing options...
DerekGannaway Posted August 20, 2019 Share Posted August 20, 2019 Try checking if the field is not null and just reverse the results:<textFieldExpression><![CDATA[$F{fieldName} != null ? $F{fieldName} : "-"]]></textFieldExpression>[/code] Link to comment Share on other sites More sharing options...
srkr Posted August 20, 2019 Share Posted August 20, 2019 Chcck if there are any spaces. (F{fieldName} == null || F{fieldName}.trim() == "") ? "-" : F{fieldName} Link to comment Share on other sites More sharing options...
zain.nabi Posted August 21, 2019 Share Posted August 21, 2019 $F{Field} == null? $F{SQL SELECT} : $F{Another Field} 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