[jasperreports-questions] large pdf report using jasper
Hello, I am trying to generate a Excel report of size 500MB- 1GB. I have written a query inside the JasperReport object which fetches about 6 records and the expected size of this report is 100MB I use following jasper code to generate the report and it takes forever to generate the report. Could anyone please let me know what I am doing wrong here and is there is better way to generate the report fast, without using too much of memory. (At present I have specified xmx=512MB). Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); java.sql.Connection conn = java.sql.DriverManager.getConnection( "jdbc:microsoft:sqlserver://localhost:1174;DatabaseName=reportdb", "guest", "guest"); Map map = new HashMap(); String strFile = "C:Report.jasper"; JasperReport jasperReport = (JasperReport) JRLoader.loadObject(strFile); File outFile = new File("c:\\outFile.xls"); Date date = new Date(); System.out.println("Start Time " + date); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, map, (java.sql.Connection)conn); List jasperPrintList = new ArrayList(); jasperPrintList.add(jasperPrint); JRExporter exporter = null; exporter = new JRXlsExporter(); OutputStream ostr = new FileOutputStream("c:\\excelfile.xls"); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ostr); exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrintList); exporter.exportReport(); Date endDate = new Date(); ostr.flush(); ostr.close(); System.out.println("End date = " + endDate ); } catch (Exception e) { e.printStackTrace(); System.out.println("Running gc"); } finally { } --- Neeraj Jain 3M HIS, 8 King Road, Rockleigh NJ. 07647 USA Direct - 201 750 5931 [EMAIL PROTECTED] [EMAIL PROTECTED] --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
[jasperreports-questions] Error in creating a jasper report
Hi I have created a jrxml and subsequently a jasper file using iReports. The report also comes nicely in the iReports Execute using active connection mode. However, when i try to incorporate this jasper file into my project ( I am using Oracle JDev 9.0.5 on Windows XP ), i get the error as mentioned in the attached error file. My Source code is also attached. Pls help. thanks Manish -- - Imagination is more important than knowledge. -- Albert Einstein06/03/30 12:38:12 Hibernate: select payroll0_.payrollid as payrollid, payroll0_.date as date9_, payroll0_.startday as startday9_, payroll0_.endday as endday9_, payroll0_.hoursworked as hourswor5_9_, payroll0_.grosspay as grosspay9_, payroll0_.deductions as deductions9_, payroll0_.netpay as netpay9_, payroll0_.empid as empid9_ from payroll payroll0_ 06/03/30 12:38:15 java.lang.NoSuchMethodException: Unknown property 'empid' 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1175) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:800) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:986) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:428) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:409) 06/03/30 12:38:15 at net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:257) 06/03/30 12:38:15 at com.cde.payroll.Common.actions.GenPayrollReportAction.execute(GenPayrollReportAction.java:68) 06/03/30 12:38:15 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 06/03/30 12:38:15 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 06/03/30 12:38:15 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485) 06/03/30 12:38:15 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:509) 06/03/30 12:38:15 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 06/03/30 12:38:15 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 06/03/30 12:38:15 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) 06/03/30 12:38:15 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) 06/03/30 12:38:15 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604) 06/03/30 12:38:15 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) 06/03/30 12:38:15 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) 06/03/30 12:38:15 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 06/03/30 12:38:15 at java.lang.Thread.run(Thread.java:534) 06/03/30 12:38:15 NESTED BY : 06/03/30 12:38:15 java.lang.NoSuchMethodException: Unknown property 'empid' 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1175) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772) 06/03/30 12:38:15 at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:800) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:986) 06/03/30 12:38:15 at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126) 06/03/30 12:38:15 at net.sf.jasperreports.e