someguy51 Posted October 25, 2007 Share Posted October 25, 2007 Hi, Is there any way to test if a subreport is empty? (it has no data to display). I am trying to display some alternate text if there is nothing in the subreport. I have a static text field with the alternate text and have been trying to come up with a "Print when expression" to hide the text if the subreport is empty. However, I don't know what that expression would be. Thanks,Chris Link to comment Share on other sites More sharing options...
svenn Posted October 25, 2007 Share Posted October 25, 2007 In your sub report go to the Report Properties and go to the more tab. Set "When no date" to "All sections, no details". Put your text in a band that does not contain any other information. Set the print when expression of this band to new Boolean($V{REPORT_COUNT}.intValue()==0) The frame will print when you query does not return any data. Link to comment Share on other sites More sharing options...
someguy51 Posted October 25, 2007 Author Share Posted October 25, 2007 Thank you very much. That worked! It will definitely be a trick I use again in the future. 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