Package net.sf.jasperreports.engine.export

Examples of net.sf.jasperreports.engine.export.JRRtfExporter


      JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

      File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".rtf");
   
      JRRtfExporter exporter = new JRRtfExporter();
   
      exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
      exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
   
      exporter.exportReport();

      System.err.println("Report : " + sourceFile + ". RTF creation time : " + (System.currentTimeMillis() - start));
    }
  }
View Full Code Here


    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".rtf");
   
    JRRtfExporter exporter = new JRRtfExporter();
   
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
   
    exporter.exportReport();

    System.err.println("RTF creation time : " + (System.currentTimeMillis() - start));
  }
View Full Code Here

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".rtf");
   
    JRRtfExporter exporter = new JRRtfExporter();
   
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
   
    exporter.exportReport();

    System.err.println("RTF creation time : " + (System.currentTimeMillis() - start));
  }
View Full Code Here

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".rtf");
   
    JRRtfExporter exporter = new JRRtfExporter();
   
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
   
    exporter.exportReport();

    System.err.println("RTF creation time : " + (System.currentTimeMillis() - start));
  }
View Full Code Here

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".rtf");
   
    JRRtfExporter exporter = new JRRtfExporter();
   
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
   
    exporter.exportReport();

    System.err.println("RTF creation time : " + (System.currentTimeMillis() - start));
  }
View Full Code Here

    JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".rtf");
   
    JRRtfExporter exporter = new JRRtfExporter();
   
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
   
    exporter.exportReport();

    System.err.println("RTF creation time : " + (System.currentTimeMillis() - start));
  }
View Full Code Here

            } else if (format.equals(FORMAT_XML)) {
                response.setContentType("text/xml");
                exporter = new JRXmlExporter();
            } else if (format.equals(FORMAT_RTF)) {
                response.setContentType("application/rtf");
                exporter = new JRRtfExporter();
            } else {
                throw new ServletException("Unknown report format: " + format);
            }

            Map exportParams = (Map) stack.findValue(exportParameters);
View Full Code Here

      }
      else if (exportType == ExportType.RTF)
      {
        engineOutput.setContentType(ReportEngineOutput.CONTENT_TYPE_RTF);
       
        exporter = new JRRtfExporter();
      }
      else
      {
        engineOutput.setContentType(ReportEngineOutput.CONTENT_TYPE_HTML);
       
View Full Code Here

                    } else if (format.equals(FORMAT_XML)) {
                        response.setContentType("text/xml");
                        exporter = new JRXmlExporter();
                    } else if (format.equals(FORMAT_RTF)) {
                        response.setContentType("application/rtf");
                        exporter = new JRRtfExporter();
                    } else {
                        throw new ServletException("Unknown report format: " + format);
                    }

                    output = exportReportToBytes(jasperPrint, exporter);
View Full Code Here

    }else if( FORMAT_CSV.equalsIgnoreCase( type ) ){
      contentType = "text/csv";
      exporter = new JRCsvExporter();
    }else if( FORMAT_RTF.equalsIgnoreCase( type ) ){
      contentType = "application/msword";
      exporter = new JRRtfExporter();
    }else if( FORMAT_XLS.equalsIgnoreCase( type ) ){
      contentType = "application/vnd.ms-excel";
      //exporter = new JRXlsExporter();
      exporter = new JExcelApiExporter();
    }else{
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.export.JRRtfExporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.