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

yamanko

Members
  • Posts

    15
  • 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 yamanko

  1. is anyone met below OoM error?

    java.lang.OutOfMemoryError: Java heap space

    java.awt.FontFormatException: java.lang.NullPointerException

          at sun.font.TrueTypeFont.open(TrueTypeFont.java:267)

          at sun.font.TrueTypeFont.readBlock(TrueTypeFont.java:295)

          at sun.font.FileFont.getGlyphImage(Native Method)

          at sun.font.FileFontStrike.getGlyphImagePtr(FileFontStrike.java:275)

  2. 371 code

    Class typeClass = getTypeClass(type);
            Object javaValue;
            try
            {
                javaValue = Context.jsToJava(value, typeClass);
            }

     

    4123 code

    Object javaValue;
            try
            {
                javaValue = Context.jsToJava(value, Object.class);
            }

  3. ClassCastException was throw when run JRXML report in JR 4.1.2.3, this JRXML report is designed by JR 3.7.1, and no double type field or variable in the whole report, and this report is exported to PDF successfully in JR 3.7.1, but got below error in JR 4.1.2.3. does anyone met similar error?

    i checked the variables in this report, if i remove all variables whose calculation is SUM or AVERAGE, this report can be run in 412 successfully too. confused!! does that mean field type is changed to double from BigDecimal when SUM or AVERAGE this field?

    Exception in thread "main" java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal
        at net.sf.jasperreports.engine.fill.JRBigDecimalSumIncrementer.increment(JRBigDecimalIncrementerFactory.java:303)
        at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42)
        at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:182)
        at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:833)
        at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1439)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:127)
        at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903)
        at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:813)
        at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
        at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)

  4. i was getting following error msg when i tried to design a mainreport and subreprot which uses JS as language. if i change subreport's language to java, it works fine. is there anyone else met this error? my iReport is 3.7.1, and also latest version 3.7.6 still has such issue.

    Error filling print... net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :      Source text : new java.lang.Integer(1)
    net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :      Source text : new java.lang.Integer(1)      at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:659)      at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:327)      at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:402)      at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:361)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterSamePage(JRVerticalFiller.java:1062)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1025)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:283)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:923)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826)      at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:59)      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)      at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:857)      at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)      at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)  Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :      Source text : new java.lang.Integer(1)      at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:253)      at net.sf.jasperreports.engine.fill.JRCalculator.evaluateEstimated(JRCalculator.java:561)      at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:165)      at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:784)      at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1448)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:108)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:923)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826)      at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:557)      at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)      at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205)      at java.lang.Thread.run(Thread.java:619)  Caused by: java.lang.RuntimeException: No Context associated with current Thread      at org.mozilla.javascript.Context.getContext(Context.java:2206)      at org.mozilla.javascript.SecurityController.createLoader(SecurityController.java:136)      at org.mozilla.javascript.optimizer.Codegen.defineClass(Codegen.java:143)      at org.mozilla.javascript.optimizer.Codegen.createScriptObject(Codegen.java:102)      at org.mozilla.javascript.Context.compileImpl(Context.java:2293)      at org.mozilla.javascript.Context.compileString(Context.java:1240)      at org.mozilla.javascript.Context.compileString(Context.java:1229)      at net.sf.jasperreports.compilers.JavaScriptEvaluator.getCompiledExpression(JavaScriptEvaluator.java:315)      at net.sf.jasperreports.compilers.JavaScriptEvaluator.evaluateExpression(JavaScriptEvaluator.java:294)      at net.sf.jasperreports.compilers.JavaScriptEvaluator.evaluateEstimated(JavaScriptEvaluator.java:276)      at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:242)      ... 11 more

  5. see following steps

    1, add dummy group header and set this band's height as 1

    2, add text control in this band and set this control's height as 1

    3, set this control's value as " ", note that this is not blank string, there needs one character in this expression

    4, set this control's hypelink, setting bookmark level anchor name

    5, make sure this control's stretch with overflow is enabled

     

    the PDF output seems good with above solution

  6. does jasper support TOC in PDF? i notice there is an attribute called 'bookmarkLevel' in text control, i can exporte report to pdf with bookmark, but not TOC.

    it's weried that this attribute, as well as anchor name expression, can not edited in IDE (iReport), but only added in jasper report before compile it. what can i do if i need TOC in PDF, i think TOC is group attribute, it should be edited in group concept rather than text control like bookmark attribute.

    does anyone have solution for TOC in PDF? im using jasper 3.7.1 now and i checked the release note of 3.7.2, no info related with TOC

  7. unfortunately, it does not work for me.

    and i think JRExporterParameter.OUTPUT_FILE_NAME and JRExporterParameter.OUTPUT_STREAM is somewhat same as each other, and normally im prefer output_stream rather than file name which export excel into a specified file

    anyway, thanks for your help

  8. The output excel miss some content when i use JRxlsExporter, i bebug the code deeply and am quite sure the missed content is in JRPrintPage, both PDF and csv output contain these missed content.

    i used JRXlsxExporter and JExcelApiExporter the results are same as JRXlsExporter. :(

    when i debug the test code, i found the exporter ignore this missed control by following code

               else if(gridCell.getWrapper() != null) // this code is in JRXlsAbstractExporter.java line 575

    same phenomenon happens in iReport (PDF and csv works properly but excel not)

    i tested some other jrxml, some excel erporter are working properly, it's weird.

    im using jasper report 3.7.1. is it a bug? does anyone meet this issue before?

    Code:
    FileInputStream fis = null;        String sourceFileString = null;        //read jasper template        File sourceFile = new File("sample.jrxml");        fis = new FileInputStream(sourceFile);        byte[] b = new byte[fis.available()];        fis.read(b);        sourceFileString = new String(b, "UTF-8");        JasperDesign design = null;        design = JRXmlLoader.load(new ByteArrayInputStream(sourceFileString.getBytes("UTF-8")));               JasperReport jr = JasperCompileManager.compileReport(design);        List<JasperPrint> jasperPrintList = new ArrayList<JasperPrint>();        JasperPrint jasperPrint = JasperFillManager.fillReport(jr, null, getConnection());        jasperPrintList.add(jasperPrint);        JRXlsExporter excelExporter =new JRXlsExporter();        //JRPdfExporter excelExporter =new JRPdfExporter();        //JRCsvExporter excelExporter =new JRCsvExporter();        //JRXlsxExporter excelExporter =new JRXlsxExporter();        // JExcelApiExporter excelExporter =new JExcelApiExporter();        //export jasper print to excel file        FileOutputStream out = new FileOutputStream(new File("./result.xls"));        excelExporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrintList);        excelExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);        excelExporter.exportReport();
  9. it 's about i18n, dictionary file named i18n.properties is already added into classpath and $R{test.key} shows correct when reportint use groovy or java. but if i use javascript to develop this report and it shows "undefined". im using iReport 3.6.2..

    is it a bug? how can i fix it? my reports are all using javascript, is it possible it happens only in IDE, which means i can implement i18n in my java application even the tamplates using javascript?

×
×
  • Create New...