Jump to content
We've recently updated our Privacy Statement, available here ×

matth33

Members
  • Posts

    4
  • Joined

  • Last visited

matth33's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. No idea with that problem ? There is no solution to increase excel export performance ?
  2. Hi, I have to produce an excel report with several sheets. Each each use a different datasource. One of them is a big one. About 100000 rows and 30 columns. I have to limit the size of that sheet to 65 000 line. S i have made de the following think : + In my .jasper file, ignore pagination is false. + I have turn the page height to (65000 * detail band heigt)+ column header ban height I should two sheets generated. So, in my java programme that run the report, i use virtualizer to limit memory consumption. I ran my programme with -Xms1024m -Xmx1500m argument. But i ran into out of memory error. What's the problem with my code ? Is there anoter way to increase performance of filling report or exporting report ? Code:// Init des option d'exportJRXlsExporter exporter = new JRXlsExporter();//exporter.setParameter(JRXlsExporterParameter.MAXIMUM_ROWS_PER_SHEET, 65000);exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);exporter.setParameter(JRXlsExporterParameter.IS_FONT_SIZE_FIX_ENABLED, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_CELL_BORDER, Boolean.FALSE);exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); // gestion des onglets dynamiqueexporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.FALSE) ;Connection conn = dataSource.getConnection(); // creating the virtualizerJRSwapFile swapFile = new JRSwapFile("D:\\temp", 2048, 2048);virtualizer = new JRSwapFileVirtualizer(1, swapFile, true); List jasperPrint = new ArrayList();// Onglet Tableau généralloggerUtils.logProcess(DISPLAYLOG,"INFO"," ---> $ETAPE - Debut Tableau General"); HashMap paramTableauGeneral= new HashMap();paramTableauGeneral.put("ANNEE",annee);paramTableauGeneral.put("ORIGINE",origine);paramTableauGeneral.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); StringBuffer fichierTableauGeneral = new StringBuffer(REP_FICHIER_JASPER).append(FICHIER_JASPER_TABLEAU_GENERAL);JasperPrint jpTableauGeneral = JasperFillManager.fillReport(fichierTableauGeneral.toString(),paramTableauGeneral, conn);jasperPrint.add(jpTableauGeneral);loggerUtils.logProcess(DISPLAYLOG,"INFO"," ---> $ETAPE - Fin Tableau General"); if (virtualizer != null){virtualizer.setReadOnly(true); }// Generation finaleloggerUtils.logProcess(DISPLAYLOG,"INFO"," ---> $ETAPE - Debut assemblage final");Set key = exporter.getParameters().keySet();exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrint);println("FICHIER SORTIE" + REP_PRODUCTION_ETAT+nomFichier);exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,REP_PRODUCTION_ETAT+nomFichier);exporter.exportReport();listeFichierProduit.add(nomFichier);loggerUtils.logProcess(DISPLAYLOG,"INFO"," ---> $ETAPE - Fin assemblage final");if (virtualizer != null){virtualizer.cleanup();}conn.close();
  3. I find a solution using group and making break each 65000 rows. It's not very confortable to use. Is there another way to proceed ? Thanks
  4. Hi guys, I need to generate a huge excel report. I want to limit the number of data per sheet with 65000. So i use this parameters : JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter(JRXlsExporterParameter.MAXIMUM_ROWS_PER_SHEET, 65000); exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_FONT_SIZE_FIX_ENABLED, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_CELL_BORDER, Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.FALSE) ; Separating data in several sheets works fine. But, i want to repeat the column header if the number of rows exceeds JRXlsExporterParameter.MAXIMUM_ROWS_PER_SHEET and that does't not work. Could you please help me. Thanks
×
×
  • Create New...