choang Posted December 11, 2009 Share Posted December 11, 2009 Hello,I am running iReport 1.3.3. And when I compiled my .jrxml file which contains the following code :...<printWhenExpression> new java.lang.Boolean($P{numTRCBugs} != 0)</printWhenExpression>..........where numTRCBugs is java.lang.IntegerI got the following compile-time error :"net.sf.jasperreports.engine.JRException: java.lang.IllegalArgumentException: Cannot invoke net.sf.jasperreports.engine.design.JRDesignElement.setPrintWhenExpression - java.lang.ClassCastException@8b9227"I wonder if someone could please tell me how to fix this problem?Thank you very much.Akino Link to comment Share on other sites More sharing options...
Teodor Danciu Posted December 12, 2009 Share Posted December 12, 2009 Hi, Try <printWhenExpression> Boolean.valueOf($P{numTRCBugs},intValue() != 0)</printWhenExpression> I hope this helps.Teodor Link to comment Share on other sites More sharing options...
hq4ever Posted December 13, 2009 Share Posted December 13, 2009 teodordWrote: Hi, Try <printWhenExpression> Boolean.valueOf($P{numTRCBugs},intValue() != 0) </printWhenExpression> I hope this helps. Teodor Note the comma, I believe that should be: <printWhenExpression> Boolean.valueOf($P{numTRCBugs}.intValue() != 0)</printWhenExpression> 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