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

louis.gely

Members
  • Posts

    21
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by louis.gely

  1. I have the same problem. I can see that during the execution of N reportings (I have a loop with a perimeter of enterprises and generate 1 report by enerprise) the objects which are used by the filler are not destroyed between each report. I'm trying to patch my jar (JasperReports 1.2.1) but it seems that my modification are not working. I am forcing null value in the filler.fillContext in JRFiller.fillReport(JasperReport jasperReport, Map parameters, JRDataSource dataSource). I have attached a capture from my profiling tool. Thanks for the help.
  2. Hi every body, I have 2 little questions : - Does someone know what is the number max of pages we can have in an pdf Report (I have some memory problem <ligne>Java heap space</ligne>) - I am using a textfield (the field is a string), and I have a string wich is only composed by figures (ex : 544063846406516540645340684). I export my report with the XlsExporter. In the Xls report the cell with this value is changed in 54406384640E10. Do you know how to avoid this transformation? (I have already use this : export.setParameter(JRXlsExporterParameter.IS_AUTO_DETECT_CELL_TYPE, Boolean.FALSE); But it does not work) Thank you in advance PS : I use JasperReports 1.2.1
  3. I patch my application with succes. But I'm wondering if there is an application which can allow me to reduce my old (and very large) reports. I tried to zip them but nothing change. Does someone have in mind a possible solution? Thank you in advance. Louis
  4. It's done, I reported the bug. I don't know if I did it the right way... Thanks Again my boss is satisfied with the patch :) Regards, Louis
  5. Hello again, Another question : Do you know if this problem will be solve in a futur version of JasperReports? Thank you again and in advance for your responce. Regards, Louis Gely
  6. Thank you for your help, with that change I lost almost 80% of my report size... It will be temporarily appreciated by my file system. I keep in touch with you. Thanks again.
  7. Thank you for your explanation. I'll try to generate my charts without font for a time. If you find a solution or path, I will be very happy. Thank you again for your concern. Louis
  8. I am using now iText 1.3.1 and before it was iText 1.0.1. Here some sample of the scriptlet for the pie chart : Code: public void afterDetailEval() throws JRScriptletException { super.afterDetailEval(); PieDataset dataset = null; try { dataset = (PieDataset) JFreeDataSetFactory.getInstance().getDataSet( JFreeDataSetFactory.DS_BUILDER_ENCOURS_ECHEANCE, this.getReportParameters()); } catch (ExceptionTechnique e) { // TODO Auto-generated catch block throw new JRScriptletException("Impossible de construire le DataSet pour l chart [" + JFreeDataSetFactory.DS_BUILDER_ENCOURS_ECHEANCE + "] Titre" + "[" + EncoursParEcheanceChartReport.REPORT_DEFAULT_TITLE+ "]", e); } JFreeChart chart = ChartFactory.createPieChart3D( EncoursParEcheanceChartReport.REPORT_DEFAULT_TITLE, dataset, true, true, false); //Customization ChartsUtils.configureStandard3DPiePlot((PiePlot3D) chart.getPlot()); ChartsUtils.configureStandardLegend((LegendTitle)chart.getLegend()); this.setVariableValue(EncoursParEcheanceChartReport.VAR_CHART_ENCOURS, new JCommonDrawableRenderer(chart)); } The scriptlet for the timesseries chart : Code:[code] public void afterDetailEval() throws JRScriptletException { String libelleFonds = (String) this.getParameterValue(HistoVLParFondsReport.PRM_FONDS_NAME); String fondsID = (String) this.getParameterValue(HistoVLParFondsReport.PRM_FONDS_ID); if (fondsID != null) { //Edition chart VL sur la période donnée TimeSeriesCollection chartVLSeries = null; Map reportParameters = getReportParameters(); try { chartVLSeries = (TimeSeriesCollection) JFreeDataSetFactory.getInstance().getDataSet( JFreeDataSetFactory.DS_BUILDER_HISTO_VL_PAR_FONDS, reportParameters); } catch (ExceptionTechnique e) { StringBuffer errorSgb = new StringBuffer(); String sep = System.getProperty("line.separator"«»); String indent = "t"; errorSgb.append("HistoVLParFondsScriptlet.beforeReportInit :: "«»).append(sep).append(indent).append( "Erreur en création de la Série histo des VL [" + e.getClass() + "]"«»).append(sep).append(indent) .append("[" + e.getMessage() + "]"«»).append(sep).append(indent).append("FondsID[" + fondsID + "]"«») .append(sep).append(indent).append("FondsNom[" + libelleFonds + "]"«»).append(sep).append(indent).append( "Une série vierge va être utilisée."«»); LOG.error(errorSgb.toString(), e); chartVLSeries = new TimeSeriesCollection(new TimeSeries(fondsID)); } TimeSeries vlSeries = chartVLSeries.getSeries(fondsID); vlSeries.setKey(libelleFonds); //vlSeries.setName(libelleFonds); double pourcent = 0; if (vlSeries.getItemCount() > 0) { pourcent = (vlSeries.getValue(vlSeries.getItemCount() - 1).doubleValue() - vlSeries.getValue(0) .doubleValue()) / Math.max(vlSeries.getValue(0).doubleValue(), 0.001); } JFreeChart chartVLSeriesAnnee = ChartFactory.createTimeSeriesChart( libelleFonds + " - " + (String) reportParameters.get(ReportsPeriodiqueConstants.PRM_PERIODE_LABEL), "", "en u20AC", chartVLSeries, false, false, false); ChartsUtils.configureStandardXYPlot((XYPlot)chartVLSeriesAnnee.getPlot()); ChartsUtils.configureTitle(chartVLSeriesAnnee.getTitle()); this.setVariableValue(HistoVLParFondsReport.VAR_CHART_VL, new JCommonDrawableRenderer(chartVLSeriesAnnee)); this.setVariableValue(HistoVLParFondsReport.VAR_POURCENT_EVOL, new Double(pourcent)); } Source of ChartsUtils : Code:[code] /* * Created on 12 oct. 2004 * */ import java.awt.Color; import java.awt.Font; import java.awt.GradientPaint; import java.text.NumberFormat; import org.jfree.chart.axis.AxisSpace; import org.jfree.chart.labels.PieSectionLabelGenerator; import org.jfree.chart.labels.StandardPieSectionLabelGenerator; import org.jfree.chart.plot.PiePlot3D; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.title.LegendTitle; import org.jfree.chart.title.TextTitle; import org.jfree.ui.RectangleInsets; import org.jfree.util.Rotation; /** * * Type ChartsUtils : * * @author dansou_d * @version 1.0 * */ public final class ChartsUtils { public static final Font FONT_ARIAL_8_PLAIN = new Font("Arial", Font.PLAIN, 8); public static final Font TIMES_NEW_ROMAN_8_PLAIN = new Font("Times new roman", Font.PLAIN, 8); public static final Font TIMES_NEW_ROMAN_5_PLAIN = new Font("Times new roman", Font.PLAIN, 5); public static final String NO_DATA_MSG = "Aucune donnée à éditer"; /** * Constructeur privé : Evite toute instanciation intempestive de cette classe * */ private ChartsUtils() { super(); } public static final PieSectionLabelGenerator getLabelPercentileGenerator() { return new StandardPieSectionLabelGenerator("{0} = {2}", NumberFormat.getNumberInstance(), NumberFormat .getPercentInstance()); } public static final PieSectionLabelGenerator getPercentileGenerator() { return new StandardPieSectionLabelGenerator("{2}", NumberFormat.getNumberInstance(), NumberFormat .getPercentInstance()); } /** * Customization standard : * <ul> * <li>StartAngle = 180° * <li>Direction = Sens aiguille montre * <li>Label = Type pourcentage * <li>NoDataMsg = Aucune donnée à éditer * </ul> * @param plot */ public static final void configureStandard3DPiePlot(PiePlot3D plot) { plot.setStartAngle(180); plot.setDirection(Rotation.CLOCKWISE); plot.setLabelGenerator(getPercentileGenerator()); plot.setInteriorGap(0); plot.setNoDataMessage(NO_DATA_MSG); } /** * @param legend */ public static final void configureStandardLegend(LegendTitle legend) { legend.setItemFont(TIMES_NEW_ROMAN_5_PLAIN); } /** * * @param plot : prm */ public static final void configureStandardXYPlot(XYPlot plot) { // plot.setDataAreaRatio((double)1/3); plot.setBackgroundPaint(new GradientPaint(0.0F, 0.0F, Color.white, 0.0F, 1000F, Color.blue)); plot.getDomainAxis().setVerticalTickLabels(true); plot.getDomainAxis().setTickLabelFont(TIMES_NEW_ROMAN_8_PLAIN); plot.getRangeAxis().setTickLabelFont(TIMES_NEW_ROMAN_8_PLAIN); // RectangleInsets insets = plot.getRangeAxis().getTickLabelInsets(); // insets.ZERO_INSETS; plot.getRangeAxis().setTickLabelInsets(RectangleInsets.ZERO_INSETS); plot.getRangeAxis().setLabelFont(TIMES_NEW_ROMAN_8_PLAIN); AxisSpace as = new AxisSpace(); // as.setBottom(10); as.setLeft(25); // as.setRight(0); // as.setTop(0); plot.setFixedRangeAxisSpace(as); plot.setNoDataMessage(NO_DATA_MSG); } /** * @param legend */ public static final void configureTitle(TextTitle title) { title.setFont(FONT_ARIAL_8_PLAIN); } } Thank you, and if you need more code I'll reply fast. Thanks again. Maybe the .jrxml : Code:[code] <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="EncoursParEcheanceChart" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="595" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="AllSectionsNoDetail" scriptletClass="com.lds.noee.ent.noyau.reporting.synthesePeriodique.position.EncoursParEcheanceScriptlet" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="2" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <reportFont name="Detail_6" isDefault="false" fontName="Arial" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/> <reportFont name="Header_6_Bold" isDefault="false" fontName="Arial" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/> <reportFont name="Footer_6_Bold" isDefault="false" fontName="Arial" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/> <reportFont name="Title_10_Bold" isDefault="false" fontName="Arial" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/> <reportFont name="BasPage_8_Italic" isDefault="false" fontName="Arial" size="8" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Oblique" pdfEncoding="Cp1250" isPdfEmbedded="true"/> <reportFont name="Detail_10" isDefault="false" fontName="Arial" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1250" isPdfEmbedded="true"/> <reportFont name="Header_10_Bold" isDefault="false" fontName="Arial" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/> <parameter name="prmIsSubReport" isForPrompting="false" class="java.lang.Boolean"> <parameterDescription><![CDATA[Dit si le template est exploité comme sub ou pas]]></parameterDescription> <defaultValueExpression ><![CDATA[java.lang.Boolean.FALSE]]></defaultValueExpression> </parameter> <parameter name="prmReportTitle" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[Le titre du report]]></parameterDescription> </parameter> <parameter name="prmEntNom" isForPrompting="false" class="java.lang.String"/> <parameter name="prmEntCode" isForPrompting="false" class="java.lang.String"/> <variable name="varChartEncours" class="net.sf.jasperreports.engine.JRRenderable" resetType="Report" calculation="System"> </variable> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="false" > </band> </columnHeader> <detail> <band height="405" isSplitAllowed="false" > <image scaleImage="FillFrame" vAlign="Top" hAlign="Left" isUsingCache="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="2" y="5" width="590" height="400" forecolor="#000000" backcolor="#FFFFFF" key="image-1" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> <imageExpression class="net.sf.jasperreports.engine.JRRenderable"><![CDATA[$V{varChartEncours}]]></imageExpression> </image> </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="0" isSplitAllowed="true" > </band> </pageFooter> <summary> <band height="0" isSplitAllowed="false" > </band> </summary> </jasperReport> Post edited by: louis.gely, at: 2006/09/04 12:59
  9. I read in the forum, that between JasperReports 0.6.8 and JasperReports 1.2.0 the pdf report that are generated are 3 times bigger (with image or charts). In my case, it's more than 10 time bigger, between 0.6.2 and 1.2.1 reports. Weird? Post edited by: louis.gely, at: 2006/09/01 11:46
  10. Hi! I'm generating pdf reports with charts using JFreeChart 1.0.0 and JasperReports 1.2.1. Before the application was generating the same reports using JasperReports 0.6 and JFreeChart 0.6. Ancient report's size = 200ko New report's size = 3Mo Does someone have an explanation for this. I tried every thing but nothing change... What is the format for the charts' images? Is it different than in the old version of JasperReports? For the information I'm generating my charts with scriptlet. An I would like to know if there was signigicant modification that could produce this huge size of report. Thank you in advance.
  11. Hi! I'm generating pdf reports with charts using JFreeChart 1.0.0 and JasperReports 1.2.1. Before the application was generating the same reports using JasperReports 0.6 and JFreeChart 0.6. Ancient report's size = 200ko New report's size = 3Mo Does someone have an explanation for this. I tried every thing but nothing change... What is the format for the charts' images? Is it different than in the old version of JasperReports? For the information I'm generating my charts with scriptlet. An I would like to know if there was signigicant modification that could produce this huge size of report. Thank you in advance.
×
×
  • Create New...