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

sconilleau

Members
  • Posts

    9
  • 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 sconilleau

  1. Thank you very much. It dit help a lot. I change this line : exporter.setParameter(JRExporterParameter.OUTPUT_FILE, reportName); to exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, reportName); and now it works. Regards, Sebastien
  2. Hi, I need to call iReport from an application. I wrote a java class to do so. The code works perfectly for a pdf export but fails for a docx (or rtf) export. I just have this error text : Exception in thread "main" java.lang.ClassCastException: java.lang.String at net.sf.jasperreports.engine.export.JRRtfExporter.exportReport(JRRtfExporter.java:207) at geneReportToolkit.ExportToRTF.getRTFReport(ExportToRTF.java:100) at geneReportToolkit.ExportToRTF.main(ExportToRTF.java:41) Here is the export part of the code Thx Code:// Export to rtfString reportName="/tmp/myRtfReport.rtf";JRRtfExporter exporter = new JRRtfExporter();exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);exporter.setParameter(JRExporterParameter.OUTPUT_FILE, reportName);exporter.exportReport();
  3. Hi every one no other idea for this issue ? regards Sébastien
  4. Hi Matt, Concerning the error I mean that if I I use $F{REPORT_OMIM_CLONING} in the text expression field instead of $F{REPORT_OMIM_CLONING}.getSubString( 1, (int)$F{REPORT_OMIM_CLONING}.length() ) I still get an "Error evaluating expression". If I set the report language to java I get this message Code:Error filling print... Error evaluating expression :Source text : $F{REPORT_OMIM_CLONING}.getSubString( 1, (int)$F{REPORT_OMIM_CLONING}.length() ) net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : $F{REPORT_OMIM_CLONING}.getSubString( 1, (int)$F{REPORT_OMIM_CLONING}.length() ) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:195) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:589) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:557) at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:929) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:383) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58) 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:877) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: java.lang.ClassCastException: oracle.sql.CLOB at GeneReport_1300896903746_727946.evaluat (GeneReport_1300896903746_727946:283) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:182) ... 19 more Print not filled. Try to use an EmptyDataSource...
  5. Hi Matt, Well, I should avoid asking for help at the end of my workind day because I'm writing many errors ! Here is the real situation : The field $F{REPORT_OMIM_DESC} is a CLOB in the database but the expression class of the text field in the report is a string. You will see in the joined report that it seems to be a CLOB to string conversion issue because even using the database field without any manipulation gives the same error. I can't explain why there is this getSubString method used to get the entire string since I didn't wrote it and it is not commented. You're right by saying that "it really shouldn't be possible to get an error like "org.codehaus.groovy.runtime..." when the report doesn't use Groovy". I have been mistaking when writing it. Actually I didn't get exactly the same message by swiching to java for the report language but there was an error at the same position. Thank you for helping me, Sébastien
  6. Hi Matt, thank you for the answer. I switched the report language to java but I get exactly the same message. Any other Idea ? Sébastien
  7. Hi, I got the above message while attempting to manipulate a string. Looks like there is an object type error but I can't find what exactly. Furthermore this syntax still works perfectly with jasperreport-3.7.2. Any advice about what I should change ? Thx Sébastien Code:Error filling print... Error evaluating expression :     Source text : $F{REPORT_OMIM_DESC}.getSubString( 1, (int)$F{REPORT_OMIM_DESC}.getLength() ) net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :     Source text : $F{REPORT_OMIM_DESC}.getSubString( 1, (int)$F{REPORT_OMIM_DESC}.getLength() )     at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:195)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:589)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:557)     at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:929)     at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:383)     at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)     at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)     at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)     at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)     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:877)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'oracle.sql.CLOB@483e4330' with class 'oracle.sql.CLOB' to class 'oracle.sql.CLOB'     at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:327)     at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:602)     at GeneReport_1300289197985_726519.evaluate(calculator_GeneReport_1300289197985_726519:251)     at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:182)     ... 19 more Print not filled. Try to use an EmptyDataSource...
×
×
  • Create New...