Javix Posted November 30, 2007 Share Posted November 30, 2007 I use iReport 2.0.2 an an XML data source for my report. Why is it not possible (it doesn't work anyway) to use an expression like:Code:$F{receiverStreet} + " " + ($F{receiverHouseBox}.equals(""«»)? "" : $F{receiverHouseBox})in a textfield?If in my xml-file receiverHouseBox(String) value is null or equals a "", so the line is empty evenn if there is a receiverStreet value.Can anybody to explain me that? Thanks. Link to comment Share on other sites More sharing options...
necronet Posted December 1, 2007 Share Posted December 1, 2007 can you maybe post the error that sends you or a better description. First make sure that all Fields are the same type if not Cast them. Link to comment Share on other sites More sharing options...
Javix Posted December 12, 2007 Author Share Posted December 12, 2007 I found a solution. You should do like this:Code:$F{receiverStreet} + " " + ($F{receiverHouseBox}!=null? $F{receiverHouseBox}:""«») 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