milito Posted December 21, 2006 Share Posted December 21, 2006 Hi: I want to put a conditional text when no data found, somebody can help me? Link to comment Share on other sites More sharing options...
jmurray Posted December 21, 2006 Share Posted December 21, 2006 By definition you won't be able to put such a field in the Detail Section because it won't exist if there's no data. To determine that there's no data you inspect the inbuilt variable REPORT_COUNT. If it is zero then the report is empty. Unfortunately the value isn't available until the report is filled, and that means you can't put it in a header or title section either. First you need to set the Report Property setting whenNoDataType to "AllSectionsNoDetail" Now you need to set up a text field in any FOOTER or SUMMARY section, with a printWhenExpression setting of "new java.lang.Boolean($V{REPORT_COUNT}.intValue()==0)". If you put this field in a footer section then the text is going to appear at the bottom of the page. The summary section is a better place to put it, as it will appear right underneath your report title and page header. 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