gal64 Posted January 5, 2010 Share Posted January 5, 2010 Hello,I read in the forum all about exporting large reports and with the help of FileVirtualizers I cannow create large JasperPrint report representations. But I have to export to Excel and thisfails with OutOfMemory.In the forum I read the following:"JExcelAPI has been made more memory-scalable in terms of writing Excel files. Starting from version 2.6.5 you can use useTemporaryFileDuringWrite. You probable need to subclass JExcelApiExporter in order to use this property."which was posted on 06/16/2008 16:12.I tried this, not with subclassing, but changing the code of "JExcelApiExporter"in the following way (changing openWorkbook): final String pathname = System.getProperty("user.home") + "/tmp"; final File tempdir = new File(pathname); WorkbookSettings ws = new WorkbookSettings(); ws.setTemporaryFileDuringWriteDirectory(tempdir); ws.setUseTemporaryFileDuringWrite(true); try { workbook = Workbook.createWorkbook(os, ws); } catch (IOException e) { throw new JRException("Error generating XLS report : " + jasperPrint.getName(), e); } But this did not help. Exporting still runs into OOME. Did I something wrong? Or is there another possible solution for the problem. Thanks for all answers. Link to comment Share on other sites More sharing options...
gal64 Posted January 6, 2010 Author Share Posted January 6, 2010 Meanwhile I noticed that the code changings I made led to creating a temporary file in the folder "user.home"/tmp. But during the export process this file will never be attached again and doesn't change it's size.The export still runs into an OOME so I suspect that there is no effect from my changings. Or do I have to changesome parameters or anything other?I'm running Jasper Reports 3.6.0 under Windows XP.Please help. Regards, Gerhard Link to comment Share on other sites More sharing options...
lucianc Posted January 7, 2010 Share Posted January 7, 2010 This has also been discussed at http://jasperforge.org/projects/jasperreports/tracker/view.php?id=4262We are yet to determine how much would this help in JR.Regards,Lucian 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