Examples of JRDocxExporter


Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

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

    File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".docx");

    JRDocxExporter exporter = new JRDocxExporter();

    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
    exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF-8");

    exporter.exportReport();

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

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

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

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

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

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

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

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

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

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

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

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

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

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

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

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

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

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

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

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

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

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

    return "docx";
  }

  public JRExporter setup() {
    configure(JRDocxExporterParameter.FLEXIBLE_ROW_HEIGHT, Boolean.TRUE);
    return new JRDocxExporter();
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

    public void DOCX(ActionEvent actionEvent) throws JRException, IOException{
        init();
       HttpServletResponse httpServletResponse=(HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
      httpServletResponse.addHeader("Content-disposition", "attachment; filename=report.docx");
       ServletOutputStream servletOutputStream=httpServletResponse.getOutputStream();
       JRDocxExporter docxExporter=new JRDocxExporter();
       docxExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
       docxExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, servletOutputStream);
       docxExporter.setParameter(JRDocxExporterParameter.OUTPUT_STREAM, servletOutputStream);
       docxExporter.exportReport();
   }
View Full Code Here

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

    return "doc";
  }

  @SuppressWarnings("rawtypes")
  public Exporter setup() {
    return new JRDocxExporter();
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.export.ooxml.JRDocxExporter

    return "docx";
  }

  @SuppressWarnings("rawtypes")
  public Exporter setup() {
    return new JRDocxExporter();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.