prancius Posted September 4, 2006 Share Posted September 4, 2006 Hello, Is it possible to know how pages will be? I need to popup custom dialog to user if no pages in report. I am showing report like that: Map<String,Date> params = new HashMap<String,Date>();params.put("dateFrom",this.dateFrom.getDate());params.put("dateUntil",this.dateUntil.getOneDayFuture()); jasperPrint = JasperFillManager.fillReport(reportName,params,DBConnection.getConnection()); When no pages i got to message boxes "The document have no pages" Why it message box appears twice? Is it some way to change message, i want to use other language. I now i can change in source but maybe there are some method? Thanks a lotPost edited by: prancius, at: 2006/09/03 20:17 Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted September 4, 2006 Share Posted September 4, 2006 Not exactly, what you can do is print the variablePAGE_NUMBER in a textfield with evaluation time Report.The value printed will be the number of pages hold by the variable at the end of the report generation. Giulio Link to comment Share on other sites More sharing options...
prancius Posted September 4, 2006 Author Share Posted September 4, 2006 I need to know how many pages before showing a report. If pages are 0 so i am popup some message to user and do not showing report. Anyway why its popup two messages ??? Link to comment Share on other sites More sharing options...
Code_Slave Posted September 6, 2006 Share Posted September 6, 2006 you do not need sooo much complexity if you look at the jasperreports there is a fucnction isEmpty(), which returns a boolean. you do not need to check page count against a "0", just check the IsEmpty() function. 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