kiran_raja Posted November 4, 2009 Share Posted November 4, 2009 Hi ,I have an requirement where my datasource contains lists of list,that is, i have created a list containing 3 lists. And each list values must be listed in 3 different sheets(there are about 9000+ records in each list). All the three sheets make use the same jrxml file. Is there a way that i can pass my datasource to JasperFillManager and it creates 3 sheets in one call.Please help.I am presently, iterating the list and calling JasperFillManagert to create 3 JasperPrint Objects. And then merging them into in one report by setting the JRExporterParameter.JASPER_PRINT_LIST parameter.This is taking a lot of memory, and in some instances goes out of memory. I need to avoid creating three jasperprint objects and the filling has to be done in one call so that i have only one jasper print object to export.Thanks, Kiran Link to comment Share on other sites More sharing options...
kiran_raja Posted November 6, 2009 Author Share Posted November 6, 2009 Hi all,I have gone a step further and serialized my jasperprint objects in the primary storage. I saw a example code posted by Lucian on this forum about a serialized list. This list picks the serialized files one by one during export , hence the memory used is considerably reduced and reports are generated for 40,000 records like a charm.(My Application memory heap size is 512MB)Now , in my application, i came across a scenario where i have to handle some 50,000 records. I am getting the out of memory error again. I saw that the jasperprint objects size created is 40MB+ each. Now when the exporter deserializes the file to genrate the final report , i am getting this error.Can anything be done to reduce the Jasperprint object size. that will help the exporter to use lesser memory space. Any help would be greatly appreciated.I also had a question, whether the virtualizer can be used while exporting the report. If yes, can anyone share the procedure/code.Thanks in advance,- KiranPost Edited by kiran_raja at 11/06/2009 11:23 Link to comment Share on other sites More sharing options...
kiran_raja Posted November 8, 2009 Author Share Posted November 8, 2009 Hi, Further research as taken me to the thread http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=57166. Which i believe can slove my problem. Any other method to reduce jasperprint size is highly appreciated. ThanksKiran Link to comment Share on other sites More sharing options...
lucianc Posted December 3, 2009 Share Posted December 3, 2009 You can use virtualizers to reduce the memory used by JasperPrint objects. Note however that virtualizers will have no effect on the memory used by the exporter itself, and the XLS exporter does use significant memory because it keeps the generated sheets in memory.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