bhanuchandharchalla Posted June 6, 2013 Share Posted June 6, 2013 Hi All,I have a situation in which I need to display "detail" band dynamically.1. There is a StaticText field and TextField(will display REMARKS).2. If REMARKS available, detail band should display on the Report.3. If REMARKS not available, detail band should not display on the Report.Any help would be very grateful on above issue. Thanks in Advance Link to comment Share on other sites More sharing options...
Solution sjoerd.jump Posted June 6, 2013 Solution Share Posted June 6, 2013 From the top of my head:Click on "detail band" and at the properties where you read "prin when"add a code like : $V{REMAKRS} != null(or search for detail band print property ;) ) Link to comment Share on other sites More sharing options...
bhanuchandharchalla Posted June 6, 2013 Author Share Posted June 6, 2013 Thanks for the quick reply. I have written this: $F{REMARKS} != null But getting compilation error: Errors were encountered when compiling report expressions class file: 1. Cannot cast from boolean to Boolean value = (java.lang.Boolean)(((java.lang.String)field_REMARKS.getValue()) != null); //$JR_EXPR_ID=71$ <-----------------------------------------------------------------------> 2. Cannot cast from boolean to Boolean value = (java.lang.Boolean)(((java.lang.String)field_REMARKS.getOldValue()) != null); //$JR_EXPR_ID=71$ <--------------------------------------------------------------------------> 3. Cannot cast from boolean to Boolean value = (java.lang.Boolean)(((java.lang.String)field_REMARKS.getValue()) != null); //$JR_EXPR_ID=71$ <-----------------------------------------------------------------------> 3 errors why it is not working here although it is working in some other condition? Link to comment Share on other sites More sharing options...
bhanuchandharchalla Posted June 6, 2013 Author Share Posted June 6, 2013 Thanks for ur help. I have added this: Boolean.valueOf($F{REMARKS != null} It is working fine now. Link to comment Share on other sites More sharing options...
sjoerd.jump Posted June 6, 2013 Share Posted June 6, 2013 great that it works now! (could you upvote my answer please?) 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