hpmxxx Posted February 13, 2007 Share Posted February 13, 2007 Hello, I'm a newbie on iReport (v1.3.0). I have a problem to make a "Print when expression" work. This is my code:Code:new Boolean($F{sales_document_headertext1}.length() > 0 || $F{sales_document_title}.length() > 0)The part which doesn't work is the logical OR operator. What am I doing wrong here? Could somebody give me a hint please? Thanks,Hans-Peter Link to comment Share on other sites More sharing options...
jmurray Posted February 13, 2007 Share Posted February 13, 2007 Unable to test this, but it should be something like: new java.lang.Boolean($F{sales_document_headertext1}.length() > 0 ? TRUE : FALSE) Of course you could deal in other data types, such as String: new java.lang.String($F{sales_document_headertext1}.length() > 0 ? "TRUE" : "FALSE") or numerics: new java.lang.Integer($F{sales_document_headertext1}.length() > 0 ? 1 : 0) or whatever you please. Have fun. 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