gombs Posted February 20, 2007 Share Posted February 20, 2007 Hi guys, maybe I have an TextField like this: $F{Monitor}+" "+ $R{loc.15}+" "+ $F{Monitor-SNR}+")" The Source is an XML-File. When maybe Monitor is not available in XML then the output shows me this: "null blablabla 12334" and null stands for the monitor.Is it possible to display nothing , I mean "" and not "null" in this line? Greets Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted February 20, 2007 Share Posted February 20, 2007 You just treat the expression as a java expression that expresses that logic. instead of:$F{Monitor}+" "+ $R{loc.15}+" "+ $F{Monitor-SNR}+")" try:$F{Monitor} == null?"":$F{Monitor}+" "+ $R{loc.15}+" "+ $F{Monitor-SNR}+")" Link to comment Share on other sites More sharing options...
gombs Posted February 21, 2007 Author Share Posted February 21, 2007 It's ok for one field, but my Problem is that every field can be null, in this example Monitor-SNR, too. Is an other solution possible? 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