Java 类net.sf.jasperreports.engine.export.oasis.JROdsExporter 实例源码

项目:jasperreports    文件:UnicodeApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/UnicodeReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:BookApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/BookReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:Barcode4JApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/Barcode4JReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:FontsApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/FontsReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:FormsApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/FormsReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:StyledTextApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/StyledTextReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:MapApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/MapReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:TabularApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/TabularReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XChartApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/XYChart.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:QueryApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/QueryReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XmlDataSourceApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/CustomersReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:SubreportApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/MasterReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:NoXmlDesignApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/NoXmlDesignReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ListApp.java   
/**
 *
 */
public void ods() throws JRException
{
    File[] files = getFiles(new File("build/reports"), "jrprint");
    for(int i = 0; i < files.length; i++)
    {
        long start = System.currentTimeMillis();
        File sourceFile = files[i];

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

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

        JROdsExporter exporter = new JROdsExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
        SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
        configuration.setOnePagePerSheet(true);
        exporter.setConfiguration(configuration);

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODT creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:NoPageBreakApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/NoPageBreakReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XlsDataSourceApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/XlsDataSourceReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:CsvDataSourceApp.java   
/**
 *
 */
public void ods() throws JRException
{
    File[] files = getFiles(new File("build/reports"), "jrprint");
    for(int i = 0; i < files.length; i++)
    {
        long start = System.currentTimeMillis();
        File sourceFile = files[i];

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

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

        JROdsExporter exporter = new JROdsExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
        SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
        configuration.setOnePagePerSheet(true);
        exporter.setConfiguration(configuration);

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODS creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:HorizontalApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/HorizontalReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:HyperlinkApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/HyperlinkReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:MarkupApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/MarkupReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:StylesApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/StylesReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:CrosstabApp.java   
/**
 *
 */
public void ods() throws JRException
{
    File[] files = getFiles(new File("build/reports"), "jrprint");
    for(int i = 0; i < files.length; i++)
    {
        long start = System.currentTimeMillis();
        File sourceFile = files[i];

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

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

        JROdsExporter exporter = new JROdsExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
        SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
        configuration.setOnePagePerSheet(true);
        exporter.setConfiguration(configuration);

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODT creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:JsonDataSourceApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/JsonCustomersReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ChartThemesApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/AllChartsReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:BarbecueApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/BarbecueReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XChartApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/XChartReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:IconLabelApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/IconLabelReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:StretchApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/StretchReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    configuration.setFontSizeFixEnabled(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:SpiderChartApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/SpiderChart.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:HibernateApp.java   
/**
 *
 */
public void ods() throws JRException
{
    File[] files = getFiles(new File("build/reports"), "jrprint");
    for(int i = 0; i < files.length; i++)
    {
        long start = System.currentTimeMillis();
        File sourceFile = files[i];

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

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

        JROdsExporter exporter = new JROdsExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
        SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
        configuration.setOnePagePerSheet(true);
        exporter.setConfiguration(configuration);

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODS creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:TableApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/TableReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:JFreeChartApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/JFreeChartReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:NoReportApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/NoReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:TableOfContentsApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/TableOfContentsReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:RotationApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/RotationReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:EjbqlApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/JRMDbReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:ChartOdsHandler.java   
public void exportElement(
    JROdsExporterContext exporterContext,
    JRGenericPrintElement element,
    JRExporterGridCell gridCell,
    int colIndex,
    int rowIndex,
    int emptyCols,
    int yCutsRow, 
    JRGridLayout layout
    )
{
    JROdsExporter exporter = (JROdsExporter)exporterContext.getExporterRef();

    JRExporterGridCell newGridCell = getGridCellReplacement(exporterContext, element, gridCell);

    try
    {
        exporter.exportText((JRPrintText)newGridCell.getElement(), newGridCell, colIndex, rowIndex);
    }
    catch (JRException e)
    {
        throw new JRRuntimeException(e);
    }
}
项目:jasperreports    文件:ScriptletApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/ScriptletReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    configuration.setProgressMonitor(new SimpleExportProgressMonitor());
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:BatchExportApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    List<JasperPrint> jasperPrintList = new ArrayList<JasperPrint>();
    jasperPrintList.add((JasperPrint)JRLoader.loadObjectFromFile("build/reports/Report1.jrprint"));
    jasperPrintList.add((JasperPrint)JRLoader.loadObjectFromFile("build/reports/Report2.jrprint"));
    jasperPrintList.add((JasperPrint)JRLoader.loadObjectFromFile("build/reports/Report3.jrprint"));

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(SimpleExporterInput.getInstance(jasperPrintList));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput("build/reports/BatchExportReport.ods"));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(false);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XlsFormulaApp.java   
/**
 *
 */
public void ods() throws JRException
{
    long start = System.currentTimeMillis();
    File sourceFile = new File("build/reports/XlsFormulaReport.jrprint");

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

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

    JROdsExporter exporter = new JROdsExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
    SimpleOdsReportConfiguration configuration = new SimpleOdsReportConfiguration();
    configuration.setOnePagePerSheet(true);
    exporter.setConfiguration(configuration);

    exporter.exportReport();

    System.err.println("ODS creation time : " + (System.currentTimeMillis() - start));
}