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

conradt

Members
  • Posts

    3
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by conradt

  1. I see - it must be new File(fileName) instead of just fileName:

     

    Code:
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE, new File(fileName)); 

    Post edited by: conradt, at: 2008/05/12 07:23

  2. Hi Lee,

     

    i tried your code (using JR2.0.5 and iText1.4.5) but get the following exception:

     

    Code:
    Exception in thread "main" java.lang.ClassCastException: java.lang.String
    at net.sf.jasperreports.engine.export.JRRtfExporter.exportReport(JRRtfExporter.java:192)
    at com.openjades.crm.documents.generator.CVGenerator.generate(CVGenerator.java:38)
    at com.openjades.crm.documents.generator.CVGenerator.main(CVGenerator.java:23)

     

    CVGenerator.java:

    Code:
    [code]
    JasperPrint jPrint = JasperFillManager.fillReport(resourcesPath + "cv.jasper",new HashMap());
    JRRtfExporter exporter = new JRRtfExporter();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE, outPath + "CV_1234.rtf"«»);
    exporter.exportReport();

     

    Any idea what causes the ClassCastException?

    Thanks.

×
×
  • Create New...