ahegde Posted November 20, 2009 Share Posted November 20, 2009 Hi,I have designed a report using Jasper version 3.0.0.The report uses 2 groups in the design. On a prticular size of the data I face the following problems:1. The pdf is generated with an extra blank page at the end2. The excel report generation fails with the following exceptionCaused by: java.lang.NegativeArraySizeException at net.sf.jasperreports.engine.export.JRGridLayout.layoutGrid(JRGridLayout.java:299) at net.sf.jasperreports.engine.export.JRGridLayout.<init>(JRGridLayout.java:144) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:454) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:434) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:218)After digging around the jasper code, I realized that the jasperprint object that we create to pass as an argument to theJasperExportManager.exportReportToPdfFile for pdf generation has a property called getPages(). I realized that thegetPages().size() [used elsewhere in the code] gave a value of 21. In the actual generated pdf file we have 20 pages of data and the last page blank with only the page header and footer.I mention that we have 2 groups in the report intentionally. I realized that when there is more than 1 group present, the way thecalculation of space required for the group footer is done may be incorrect specially in the 2 cases:1. The values of both the groups changes2. The end of the report is reached, so we have to put in a group footer.Request the technical support team to please advise on whether this is a know issue and if yes, whether later version of jasperhas a fix for this.Thanks! Link to comment Share on other sites More sharing options...
teodord Posted November 24, 2009 Share Posted November 24, 2009 Hi, You need to either provide us with the report template and the data to be able to reproduce the problem locally, or you could give us the *.jrprint object (report prior to export). or the generated report exported to XML format using the JRXmlExporter.You could also try a more recent version of JR yourself, to see if the problem has dissappeared. Thanks,Teodor 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