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

longbeach751

Members
  • Posts

    17
  • 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

Posts posted by longbeach751

  1. then i get the same error :

    Code:
    net.sf.jasperreports.engine.JRRuntimeException: Error incrementing crosstab dataset
    at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:665)
    at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:169)
    at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:152)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:682)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:275)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:891)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:795)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:519)
    at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63)
    at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: net.sf.jasperreports.engine.JRException: Crosstab data has already been processed.
    at net.sf.jasperreports.crosstabs.fill.calculation.BucketingService.addData(BucketingService.java:296)
    at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:661)
    ... 11 more


     

    Another suggestion ?

  2. Hi,

    I want to create a crosstab, based on a sub dataset :

     

    SELECT *

    FROM DISTRIBUTION

    WHERE ID_MODE_COTATION = $P{ModeCota}

     

    The problem is that i get an error with the criteria $P{ModeCota}

     

    ID_MODE_COTATION type is BigDecimal in my .jrxml file and NUMBER in the column in the DISTRIBUTION table of the database.

     

    I have declared a parameter ModeCola, of type BigDecimal, to match the ID_MODE_COTATION

    from my report query :

    select distinct id_mode_cotation from MODE_COTATION

     

    I have tried to change it to String, it dit not change anything, i still get the error message :

    Non supported SQL92 token at position 68 : ModeCola

     

    Any clue ? thanks

    Post edited by: longbeach751, at: 2008/03/10 13:42

  3. hi,

    i am trying to display crosstabs, one crosstab for each category.

    So I created a group based on the CATEGORY field, and i checked RESET GROUP in the properties of my crosstab.

    I have one .jrxml report only.

    Whether i put the crosstab inside the DETAIL band or the SUMMARY band, it's always the same :

    i get the error "Error incrementing crosstab Dataset".

     

    Is there a way to make it work ?

    Thanks for your help.

  4. Hi,

    I tried to insert 2 times the same subreport inside a report, with dynamic values inside of the subreport, and only the values inside the first subreport are displayed. The second subreport is displayed, but not the dynamic values.

     

    After many tests, i figured it out : I needed to use a different datasource for each sub report.

     

    So my question is this one : why ? why can't 2 or more subreports inside a report share the same datasource ?

     

    Thanks for your help.

  5. Hi,

    I am trying to generate this kind of report :

    size=150]http://imageblog.blog4ever.com/blogfichiers/182195/photos/260205261821951726.jpeg

     

    Both lines are dynamic :

    we can have more or less than 9 cells in the NOTE line

    we can have more or less than 3 cells in the ZONE line

     

    I use JavaBeans for my datasource.

     

    Here is the Zone object :

    Code:

     

    Here is the Note object :

    Code:

     

    Datasource :

    Code:

     

    Can crosstabs do it ?

    Thanks for your ideas and feeback.

  6. Hi,

    In order to display images inside a generated Excel report, using JRXlsExporter instead of JExcelApiExporter due to performances issues, I created a class JRXlsExporterPatch2.java that extends the class JRXlsExporter.java

    I edited and added several methods. Here is the code for

    JRXlsExporterPatch2.java :

    Code:

    mport net.sf.jasperreports.engine.JRPrintImage;
    import net.sf.jasperreports.engine.export.JRExporterGridCell;
    import net.sf.jasperreports.engine.export.JRGridLayout;
    import net.sf.jasperreports.engine.export.JRXlsExporter;
    import net.sf.jasperreports.engine.export.JRGridLayout.ExporterElements;

    import org.apache.poi.hssf.usermodel.HSSFCellStyle;
    import org.apache.poi.hssf.usermodel.HSSFClientAnchor;
    import org.apache.poi.hssf.usermodel.HSSFFont;
    import org.apache.poi.hssf.usermodel.HSSFPatriarch;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;

    public class JRXlsExporterPatch2 extends JRXlsExporter
    {

    // edited
    protected ExporterElements getExporterElements()
    {
    // return JRGridLayout.NO_IMAGES_EXPORTER;
    return JRGridLayout.UNIVERSAL_EXPORTER;
    }

    // added
    protected HSSFPatriarch patriarch =null;

    // edited
    protected void createSheet(String name)
    {
    sheet = workbook.createSheet(name);
    patriarch = sheet.createDrawingPatriarch();
    }

    // added
    protected void exportImage(JRPrintImage image, JRExporterGridCell gridCell, int colIndex, int rowIndex) {
    short forecolor = getNearestColor(image.getForecolor()).getIndex();
    HSSFFont cellFont = getLoadedFont(getDefaultFont(), forecolor);
    HSSFCellStyle cellStyle =
    getLoadedCellStyle(
    HSSFCellStyle.SOLID_FOREGROUND,
    forecolor,
    HSSFCellStyle.ALIGN_LEFT,
    HSSFCellStyle.VERTICAL_TOP,
    (short) 0,
    cellFont,
    gridCell
    );

    HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, image.getWidth(), image.getHeight(), (short) colIndex, rowIndex,
    (short) (colIndex + gridCell.colSpan), rowIndex + gridCell.rowSpan);
    try {
    patriarch.createPicture(anchor, workbook.addPicture(image.getRenderer().getImageData(), HSSFWorkbook.PICTURE_TYPE_JPEG));
    } catch (Exception ex) {
    ex.printStackTrace();
    }
    }
    // edited
    protected void setRowHeight(int rowIndex, int lastRowHeight)
    {
    row = sheet.getRow(rowIndex);

    if (row == null)
    {
    row = sheet.createRow(rowIndex);
    }

    row.setHeightInPoints(lastRowHeight);

    }


    }

     

    I use the latest version of the Apache POI library

    poi-3.0.1-FINAL-20070705.jar (else it does not know about the addPicture(...) method)

     

    It works well when I want to generate Excel files that have less than 65535 rows, which of course is the limit for a sheet in an Excel document.

     

    But if I try more than 65535 rows, I get the following message :

    java.lang.IndexOutOfBoundsException: Row number must be between 0 and 65535, was <65536>
    at org.apache.poi.hssf.usermodel.HSSFRow.setRowNum(HSSFRow.java:208)
    at org.apache.poi.hssf.usermodel.HSSFSheet.getRow(HSSFSheet.java:319)
    at com.lds.noee.util.noyau.reporting.jasper.reports.jasperReports.JRXlsExporterPatch2.setRowHeight(JRXlsExporterPatch2.java:80)

     

    So does anyone know how to handle this error, or define an exportImage(...) method that avoids this error ? :(

     

    My goal is to display images inside an Excel document.

    I know the JExcelApi Api (JExcelApiExporter) does it well, but for a reason that I have not yet identified,

    it takes an enormous time (like 1h30).

    Also, I end up with an Excel file that is huge (27 MB ) :blink:

    and quite impossible to open.

    Thanks in advance for your advices.:)

    Post edited by: longbeach751, at: 2007/08/06 14:44

  7. Code:
     case ReportInstance.EXPORT_2_XLS: {

    //export = new JRXlsExporter();
    export = new JExcelApiExporter();


    export.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);
    export.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
    /**********************/
    //Passage à TRUE au lieu de FALSE
    export.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.TRUE);
    /**********************/
    if(arraySheetsName!=null){
    export.setParameter(JExcelApiExporterParameter.SHEET_NAMES, arraySheetsName);
    }
    export.setParameter(JExcelApiExporterParameter.IS_AUTO_DETECT_CELL_TYPE, fautoDetectCellType);

    normalisedNamesMap = normaliseReportInstancesNameForXLSExport();

    break;
    }

     

    and in my master .jrxml :

     

    Code:
    [code]jasperReport
    name="BalanceAgee"
    columnCount="1"
    printOrder="Vertical"
    orientation="Portrait"
    pageWidth="595"
    pageHeight="28000000"
    columnWidth="535"
    columnSpacing="0"
    leftMargin="30"
    rightMargin="30"
    topMargin="20"
    bottomMargin="20"
    whenNoDataType="AllSectionsNoDetail"
    isTitleNewPage="false"
    isSummaryNewPage="false">

     

    So, as you can see, both parameters you talked about are set up to the appropriate value.

    Any clue ? thanks

     

    Also, I have a memory problem. I made an attempt with the JRFileVirtualizer class, it adds big chunks of swap files to my filesystem, i am still running it, for almost an hour, i already have like 1GB of swap files and it is increasing of course. I am not sure it is going to make any difference.

     

    Basically, i have something like 75 000 rows to extract from the database and integrate in my Excel file, and I am facing 2 big problems:

    1) java.lang.OutOfMemoryError exception

    2) too many rows for the sheet exception

     

    Does anyone know how to deal with these 2 problems ?

    Thanks

    Post edited by: longbeach751, at: 2007/07/26 15:42

  8. Hi,

    I have a problem when i try to generate an excel report, using JasperReports

     

    I get the error jxl.write.biff.RowsExceededException: The maximum number of rows permitted on a worksheet been exceeded

     

    Could you please guide me on what solution I could try with JasperReports / IReport to avoid this limitation ?

    Is there a way to specify a new sheet when the maximum number of rows ( 65,536 ) has been reached ?

     

    Thanks a lot for your help.

  9. Hi,

    I have a problem when i try to generate an excel report, using JasperReports

     

    I get the error jxl.write.biff.RowsExceededException: The maximum number of rows permitted on a worksheet been exceeded

     

    Could you please guide me on what solution I could try with JasperReports / IReport to avoid this limitation ?

    Is there a way to specify a new sheet when the maximum number of rows ( 65,536 ) has been reached ?

     

    Thanks a lot for your help.

×
×
  • Create New...