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

项目:jasperreports    文件:ListApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

        JROdtExporter exporter = new JROdtExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODT creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:CsvDataSourceApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

        JROdtExporter exporter = new JROdtExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODT creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:CrosstabApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

        JROdtExporter exporter = new JROdtExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODT creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:HibernateApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

        JROdtExporter exporter = new JROdtExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODT creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:ScriptletApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

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

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:BatchExportApp.java   
/**
 *
 */
public void odt() 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"));

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(SimpleExporterInput.getInstance(jasperPrintList));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput("build/reports/BatchExportReport.odt"));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:HtmlElementOdtHandler.java   
@Override
public void exportElement(
    JROdtExporterContext exporterContext,
    JRGenericPrintElement element,
    JRExporterGridCell gridCell
    )
{
    try
    {
        JROdtExporter exporter = (JROdtExporter)exporterContext.getExporterRef();
        HtmlPrintElement htmlPrintElement = HtmlPrintElementUtils.getHtmlPrintElement();
        exporter.exportImage(exporterContext.getTableBuilder(), htmlPrintElement.createImageFromElement(element), gridCell);
    }
    catch (Exception e)
    {
        throw new RuntimeException(e);
    }
}
项目:jasperreports    文件:MondrianApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

        JROdtExporter exporter = new JROdtExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

        exporter.exportReport();

        System.err.println("Report : " + sourceFile + ". ODT creation time : " + (System.currentTimeMillis() - start));
    }
}
项目:jasperreports    文件:MapElementOdtHandler.java   
@Override
public void exportElement(
    JROdtExporterContext exporterContext,
    JRGenericPrintElement element,
    JRExporterGridCell gridCell
    )
{
    try
    {
        JROdtExporter exporter = (JROdtExporter)exporterContext.getExporterRef();
        exporter.exportImage(
            exporterContext.getTableBuilder(), 
            MapElementImageProvider.getImage(exporterContext.getJasperReportsContext(), element), 
            gridCell
            );
    }
    catch (Exception e)
    {
        throw new RuntimeException(e);
    }
}
项目:jasperreports    文件:IconLabelElementOdtHandler.java   
@Override
public void exportElement(
    JROdtExporterContext exporterContext,
    JRGenericPrintElement element, 
    JRExporterGridCell gridCell
    ) 
{
    JRPrintText labelPrintText = (JRPrintText)element.getParameterValue(IconLabelElement.PARAMETER_LABEL_TEXT_ELEMENT);
    if (labelPrintText != null)
    {
        try
        {
            JROdtExporter exporter = (JROdtExporter)exporterContext.getExporterRef();
            exporter.exportText(exporterContext.getTableBuilder(), labelPrintText, gridCell);
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
    }
}
项目:engerek    文件:ReportCreateTaskHandler.java   
private Exporter createExporter(ExportType type) {
    switch (type) {
        case CSV:
            return new JRCsvExporter();
        case RTF:
            return new JRRtfExporter();
        case XLS:
            return new JRXlsExporter();
        case ODT:
            return new JROdtExporter();
        case ODS:
            return new JROdsExporter();
        case DOCX:
            return new JRDocxExporter();
        case XLSX:
            return new JRXlsxExporter();
        case PPTX:
            return new JRPptxExporter();
        default:
            return null;
    }
}
项目:com.opendoorlogistics    文件:ReporterComponent.java   
private void exportPrintObject(ReporterConfig rc, final JasperPrint print, final ComponentExecutionApi reporter) {
    // build the export filename
    String filename = buildFilename(reporter, rc);

    // do each export option
    if (rc.isCsv()) {
        export(new JRCsvExporter(), print, filename, "csv", rc.isOpenExportFile());
    }
    if (rc.isDocx()) {
        export(new JRDocxExporter(), print, filename, "docx", rc.isOpenExportFile());
    }
    if (rc.isOdt()) {
        export(new JROdtExporter(), print, filename, "odt", rc.isOpenExportFile());
    }
    if (rc.isHtml()) {
        export(new JRHtmlExporter(), print, filename, "html", rc.isOpenExportFile());
    }
    if (rc.isPdf()) {
        export(new JRPdfExporter(), print, filename, "pdf", rc.isOpenExportFile());
    }
    if (rc.isXls()) {
        export(new JRXlsExporter(), print, filename, "xls", rc.isOpenExportFile());
    }

    // do show viewer at the end so it pops up after everything else
    if (rc.isShowViewer()) {
        reporter.submitControlLauncher(new ControlLauncherCallback() {

            @Override
            public void launchControls(ComponentControlLauncherApi launcherApi) {
                class DisposableViewer extends JRViewer implements Disposable {

                    DisposableViewer(JasperPrint jrPrint) {
                        super(jrPrint);
                    }

                    @Override
                    public void dispose() {
                    }

                }
                DisposableViewer viewer = new DisposableViewer(print);
                launcherApi.registerPanel("report", null, viewer, true);
            }
        });

    }
}
项目:dynamicreports-jasper    文件:ExporterTransform.java   
private JROdtExporter odt(JasperIOdtExporter jasperExporter) {
    SimpleOutputStreamExporterOutput exporterOutput = simpleOutputStreamExporterOutput(jasperExporter);
    SimpleOdtReportConfiguration reportExportConfiguration = new SimpleOdtReportConfiguration();
    reportExportConfiguration(reportExportConfiguration, jasperExporter);
    if (jasperExporter.getFlexibleRowHeight() != null) {
        reportExportConfiguration.setFlexibleRowHeight(jasperExporter.getFlexibleRowHeight());
    }
    if (jasperExporter.getIgnoreHyperLink() != null) {
        reportExportConfiguration.setIgnoreHyperlink(jasperExporter.getIgnoreHyperLink());
    }
    SimpleOdtExporterConfiguration exporterConfiguration = new SimpleOdtExporterConfiguration();

    JROdtExporter jrExporter = new JROdtExporter();
    jrExporter.setExporterOutput(exporterOutput);
    jrExporter.setConfiguration(reportExportConfiguration);
    jrExporter.setConfiguration(exporterConfiguration);
    return jrExporter;
}
项目:jasperreports    文件:ChartOdtHandler.java   
public void exportElement(
    JROdtExporterContext exporterContext,
    JRGenericPrintElement element,
    JRExporterGridCell gridCell
    )
{
    JROdtExporter exporter = (JROdtExporter)exporterContext.getExporterRef();

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

    exporter.exportText(exporterContext.getTableBuilder(), (JRPrintText)newGridCell.getElement(), newGridCell);
}
项目:jasperreports    文件:JROdtSaveContributor.java   
@Override
public void save(JasperPrint jasperPrint, File file) throws JRException
{
    if(!file.getName().toLowerCase().endsWith(EXTENSION_ODT))
    {
        file = new File(file.getAbsolutePath() + EXTENSION_ODT);
    }

    if (
        !file.exists() ||
        JOptionPane.OK_OPTION == 
            JOptionPane.showConfirmDialog(
                null, 
                MessageFormat.format(
                    getBundleString("file.exists"),
                    new Object[]{file.getName()}
                    ), 
                getBundleString("save"), 
                JOptionPane.OK_CANCEL_OPTION
                )
        )
    {
        JROdtExporter exporter = new JROdtExporter(getJasperReportsContext());
        exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); 
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(file));
        exporter.exportReport();
    }
}
项目:jasperstarter    文件:Report.java   
public void exportOdt() throws JRException {
    JROdtExporter exporter = new JROdtExporter();
    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(this.output
            .getAbsolutePath() + ".odt"));
    exporter.exportReport();
}
项目:PDFReporter-Studio    文件:ExportAsOdtAction.java   
@Override
protected JROdtExporter getExporter(JasperReportsConfiguration jContext, JRExportProgressMonitor monitor, File file) {
    JROdtExporter exp = new JROdtExporter(jContext);
    exp.setExporterOutput(new SimpleOutputStreamExporterOutput(file));

    SimpleOdtReportConfiguration rconf = new SimpleOdtReportConfiguration();
    setupReportConfiguration(rconf, monitor);
    exp.setConfiguration(rconf);

    return exp;
}
项目:io-addon    文件:JasperRenderer.java   
/**
 * Exports by MIME type.
 *
 * @param mimeType MIME type
 * @param jp       Jasper print
 * @param os       outputstream
 * @throws JRException
 */
protected void export(String mimeType, JasperPrint jp, OutputStream os) throws JRException {
    if ("application/pdf".equalsIgnoreCase(mimeType)) {
        exportReport(new JRPdfExporter(), jp, os);

    } else if ("text/xml".equalsIgnoreCase(mimeType)) {
        exportReport(new HtmlExporter(), jp, os);

    } else if ("application/rtf".equalsIgnoreCase(mimeType)) {
        exportReport(new JRRtfExporter(), jp, os);

    } else if ("application/xls".equalsIgnoreCase(mimeType)) {
        exportReport(new JRXlsExporter(), jp, os);

    } else if ("application/odt".equalsIgnoreCase(mimeType)) {
        exportReport(new JROdtExporter(), jp, os);

    } else if ("application/ods".equalsIgnoreCase(mimeType)) {
        exportReport(new JROdsExporter(), jp, os);

    } else if ("application/docx".equalsIgnoreCase(mimeType)) {
        exportReport(new JRDocxExporter(), jp, os);

    } else if ("application/xlsx".equalsIgnoreCase(mimeType)) {
        exportReport(new JRXlsxExporter(), jp, os);

    } else if ("application/pptx".equalsIgnoreCase(mimeType)) {
        exportReport(new JRPptxExporter(), jp, os);

    } else if ("text/xhmtl".equalsIgnoreCase(mimeType)) {
        exportReport(new JRXhtmlExporter(), jp, os);
    } else {
        throw new IllegalArgumentException("JasperRenderer does not support " + mimeType + " MIME type.");
    }
}
项目:jasper-service    文件:JasperProcess.java   
protected void odt(JasperPrint print, String destFile) throws JRException, IOException {
    log.debug("exporting to odt file: " + destFile);
    JROdtExporter exporter = new JROdtExporter();
exporter.setExporterInput(new SimpleExporterInput(print));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));
exporter.exportReport();
 }
项目:jasperreports-wms-component    文件:WmsMapElementOdtHandler.java   
@Override
public void exportElement(JROdtExporterContext exporterContext,
    JRGenericPrintElement element, JRExporterGridCell gridCell) {
  try {
    JROdtExporter exporter = (JROdtExporter) exporterContext.getExporter();
    exporter.exportImage(exporterContext.getTableBuilder(),
        getImage(exporterContext, element), gridCell);
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}
项目:jasperreports    文件:UnicodeApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:BookApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:Barcode4JApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

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

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

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

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:FontsApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:FormsApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:StyledTextApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:MapApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:TabularApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XChartApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:QueryApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

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

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

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

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XmlDataSourceApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:SubreportApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:NoXmlDesignApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:NoPageBreakApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:XlsDataSourceApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:HorizontalApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:HyperlinkApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

    System.err.println("ODT creation time : " + (System.currentTimeMillis() - start));
}
项目:jasperreports    文件:MarkupApp.java   
/**
 *
 */
public void odt() 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() + ".odt");

    JROdtExporter exporter = new JROdtExporter();

    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile));

    exporter.exportReport();

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