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

neozerabbit

Members
  • Posts

    66
  • Joined

  • Last visited

neozerabbit's Achievements

Enthusiast

Enthusiast (6/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Your problem il here : $F{Titre} It is a parameter, not a field (field is a datasource field) Correction : $P{Titre}
  2. I am working on it but i do no manage in setting annotation where i want in the graphe. I can set y value of annotations but not x value. I use Bar chart ; Category Annotation. I would like something like | Cat1 Cat2 | ---- | | | |-------|--|------- |---|---------------------------------- |---| (with a 45 degres orientation angle) I am thinkg about base item label generator Post Edited by neozerabbit at 11/09/2011 09:59
  3. Nobody Post Edited by neozerabbit at 10/12/2011 12:52
  4. I do not use swap file virtualize. I virtualize by report. Perhaps you should not set virtualizer to read only. I am not sure. I DO : virtualizer = new JRFileVirtualizer(1, tmpDirectory); ... reportParameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); ... JasperPrint reportPrint = reportGenerationBusinessService.fillReport(reportObj, reportParameters, new JREmptyDataSource()); .... export to XLS I made test with more than 20 000 lines of data I do not use the JExcel exporter because it is low. I use POI exporter (like you, it seems) Here my params : logger.debug("Start Export XLS POI"); long nanoTime = System.nanoTime(); File reportOutputFile = createExportFile(reportFileName, ".xls"); JRXlsExporter exporterJRX = new JRXlsExporter(); exporterJRX.setParameter(JRExporterParameter.OUTPUT_FILE, reportOutputFile); exporterJRX.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporterJRX.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF8"); exporterJRX.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, true); exporterJRX.setParameter(JRXlsExporterParameter.SHEET_NAMES, sheetsName); exporterJRX.setParameter(JRXlsExporterParameter.MAXIMUM_ROWS_PER_SHEET, 65000); exporterJRX.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, true); exporterJRX.setParameter(JRXlsExporterParameter.IS_IGNORE_CELL_BACKGROUND, false); exporterJRX.setParameter(JRXlsExporterParameter.IS_IGNORE_CELL_BORDER, false); exporterJRX.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, true); exporterJRX.setParameter(JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN, false); exporterJRX.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, false); exporterJRX.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, false); Map<String, String> numberFormats = new HashMap<String, String>(); numberFormats.put("#,##0.0000000000", "#,##0.00;-#,##0.00"); numberFormats.put("#,##0.0000000000 %", "#,##0.00;-#,##0.00" ); exporterJRX.setParameter(JRXlsExporterParameter.FORMAT_PATTERNS_MAP, numberFormats); exporterJRX.exportReport(); logger.info("End Export XLS POI " + (System.nanoTime()-nanoTime)/MILLIS + "ms" ); return reportOutputFile; HOPE it'll help you Post Edited by neozerabbit at 10/07/2011 14:56
  5. Is it possible, and how, to embbed legends in a chart, not on the top, bottom, left or right ?
  6. I haven't been here for a certain time. I never set directly a file with a path to jasper compile. I prefer to retreive a file and get an input stream on, and compile. EX : inputStream = new FileInputStream(reportsRootDir + DIRECTORY + ReportFile.POST_TRADE_OVERVIEW.value()); JasperReport reportOverview = JasperCompileManager.compileReport(inputStream); With that you can see directly if the problem is the input stream (retreive the file) or in the jasper file (compilation problem). You should also add a catch EXCEPTION block and log errors to have more information on you problem. For me it's blank spaces. Remember thar between systems it can be "/" or "\" for file path separator. It's why i prefer not to use hard coded path by as constant using java File seperator" (when report files are on the user computer). In some cases my jrxml file are delivered (ex : Maven deploy) in the a java source path ; so I can access them without specifying a path with "/" or "\" separators.
  7. Thanks. My error was to return "" instead of null. Now it's fine.
  8. Is there a way to hide one or several label links ? Explanation : I was asked in a pie chart to explode slices and display a label when it's >30% I make my own label generator extending StandardPieSectionLabelGenerator. So I am able to hide some of my labels but not hiide the label link. With "plot.setLabelLinksVisible(false);" we can hide all label links but I want to choose with label link to hide. I am searching on plot customization but with no sucess.
  9. I think you have a mal formed exception or file not found exception but you do not catch it so you do not see it. Add a catch(Exception) to see what happend. You'll delete it once you've solved you problem. You seem to have a class path problem. when I see you file expression I notice there are spaces in your string. I think your problem is there. You should rather use a file path like "c:\conf\reports\..."
  10. It depends of your needs. In some case report fragmentation can be usefull. For exemple I have a report with a daily and a monthly report. One of my report pages is different. I though it was to complicated to make one jrxml for daily and monthly sub report. So I created a daily sub report and a monthly sub report. I have a master page who choose the correct sub report at runtime. In some other case I change the report design at runtime. For exemple, before running user can select if he want 4 ou 5 tabs for his report. At runtime I modify my master report to delete the 5th tab when it's not requested. There are some good practices but design stays yours ;-). One pratice I like is to separate report from data. I request and prepare all my datasources before filling the report. My report does not have SQL or any other code request. I pass reports and datasources as parameter of a master report.
  11. I think it's something you must do before the fillReport and set a parameter that give you a specific repot
  12. Thanks. I missed something. I had to cas my renderer and set some properties to obtain border on bars of my chart I has to set outline bar on true BarRenderer renderer = (BarRenderer) plot.getRenderer(); renderer.setDrawBarOutline(true); // Bars border ..... // Bars border renderer.setSeriesOutlinePaint(i, Color.BLACK); renderer.setSeriesOutlineStroke(i, new BasicStroke(0.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
×
×
  • Create New...