hell.gourmet Posted January 19, 2007 Share Posted January 19, 2007 Hi, I have the following code in a servlet to print a reportCode: The problem that I have is when the report's query do not get anydata: the report is printed anyway but like a white page (in html or pdf). Are there some method to query if the report has data or not? I have the option Code: embebed in the .jrxml file but I get the blank page anyway. Some help will be welcome. Cheers!Post edited by: hell.gourmet, at: 2007/01/19 14:58 Link to comment Share on other sites More sharing options...
lucianc Posted January 19, 2007 Share Posted January 19, 2007 You can doCode:boolean hasData = !jasperprint.getPages().isEmpty(); HTH,Lucian Link to comment Share on other sites More sharing options...
hell.gourmet Posted January 20, 2007 Author Share Posted January 20, 2007 Thanks a lot. I gonna try your solution. Link to comment Share on other sites More sharing options...
hell.gourmet Posted January 20, 2007 Author Share Posted January 20, 2007 works like a charm! Thanks again! Cheers! 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