Examples of ReportProcessor


Examples of org.jfree.report.flow.ReportProcessor

            jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
    //noinspection OverlyBroadCatchBlock
    try
    {
      final long startTime = System.currentTimeMillis();
      final ReportProcessor rp = getProcessorForContentType(contentType);
      rp.processReport(job);
      job.close();
      final long endTime = System.currentTimeMillis();
      Log.debug ("Report processing time: "  + (endTime - startTime));
    }
    catch (final Exception e)
View Full Code Here

Examples of org.jfree.report.flow.ReportProcessor

            parameters.put(SDBCReportDataFactory.UNO_FILTER, filter);

            parameters.put(ReportEngineParameterNames.MAXROWS, report.getJobProperties().getProperty(ReportEngineParameterNames.MAXROWS));

            final long startTime = System.currentTimeMillis();
            final ReportProcessor rp = getProcessorForContentType(contentType);
            rp.processReport(job);
            job.close();
            final long endTime = System.currentTimeMillis();
            LOGGER.debug("Report processing time: " + (endTime - startTime));
        }
        catch (final Exception e)
View Full Code Here

Examples of org.jfree.report.flow.ReportProcessor

    }

    protected ReportProcessor getProcessorForContentType(final String mimeType)
            throws ReportExecutionException
    {
        final ReportProcessor ret;

        if (PentahoReportEngineMetaData.OPENDOCUMENT_SPREADSHEET.equals(mimeType))
        {
            ret = new SpreadsheetRawReportProcessor(inputRepository, outputRepository, outputName, imageService, dataSourceFactory);
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.output.ReportProcessor

      final FileRepository targetRepository = new FileRepository(targetDirectory);
      final ContentLocation targetRoot = targetRepository.getRoot();

      final FileRepository dataRepository = new FileRepository(dataDirectory);
      final ContentLocation dataRoot = dataRepository.getRoot();
      final ReportProcessor sp;
      if ("pageable".equals(exportMethod))//$NON-NLS-1$
      {
        final PageableHtmlOutputProcessor outputProcessor = new PageableHtmlOutputProcessor(report.getConfiguration());
        final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
        printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, filename, suffix));
        printer.setDataWriter(dataRoot, new DefaultNameGenerator(dataRoot, "content")); //$NON-NLS-1$
        printer.setUrlRewriter(new FileSystemURLRewriter());
        outputProcessor.setPrinter(printer);
        sp = new PageableReportProcessor(report, outputProcessor);
      }
      else
      {
        final HtmlOutputProcessor outputProcessor = createOutputProcessor();
        final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
        printer.setContentWriter(targetRoot,
            new DefaultNameGenerator(targetRoot, filename, suffix));
        printer.setDataWriter(dataRoot, new DefaultNameGenerator(dataRoot, "content")); //$NON-NLS-1$
        printer.setUrlRewriter(new FileSystemURLRewriter());
        outputProcessor.setPrinter(printer);
        sp = new FlowReportProcessor(report, outputProcessor);
      }
      if (progressDialog != null)
      {
        progressDialog.setModal(false);
        progressDialog.setVisible(true);
        sp.addReportProgressListener(progressDialog);
      }
      sp.processReport();
      sp.close();

      if (progressDialog != null)
      {
        sp.removeReportProgressListener(progressDialog);
      }

      if (statusListener != null)
      {
        statusListener.setStatus(StatusType.INFORMATION, messages.getString
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.output.ReportProcessor

      final ZipRepository zipRepository = new ZipRepository(out);
      final ContentLocation root = zipRepository.getRoot();
      final ContentLocation data = RepositoryUtilities.createLocation
          (zipRepository, RepositoryUtilities.splitPath(dataDirectory, "/")); //$NON-NLS-1$

      final ReportProcessor sp;
      if ("pageable".equals(exportMethod))//$NON-NLS-1$
      {
        final PageableHtmlOutputProcessor outputProcessor = new PageableHtmlOutputProcessor(report.getConfiguration());
        final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
        printer.setContentWriter(root, new DefaultNameGenerator(root, "report.html")); //$NON-NLS-1$
        printer.setDataWriter(data, new DefaultNameGenerator(data, "content")); //$NON-NLS-1$
        printer.setUrlRewriter(new SingleRepositoryURLRewriter());
        outputProcessor.setPrinter(printer);
        sp = new PageableReportProcessor(report, outputProcessor);
      }
      else
      {
        final HtmlOutputProcessor outputProcessor = createOutputProcessor();
        final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
        printer.setContentWriter(root, new DefaultNameGenerator(root, "report.html")); //$NON-NLS-1$
        printer.setDataWriter(data, new DefaultNameGenerator(data, "content")); //$NON-NLS-1$
        printer.setUrlRewriter(new SingleRepositoryURLRewriter());
        outputProcessor.setPrinter(printer);
        sp = new FlowReportProcessor(report, outputProcessor);
      }
      if (progressDialog != null)
      {
        progressDialog.setModal(false);
        progressDialog.setVisible(true);
        sp.addReportProgressListener(progressDialog);
      }
      sp.processReport();
      sp.close();

      zipRepository.close();
      out.close();
      out = null;

      if (progressDialog != null)
      {
        sp.removeReportProgressListener(progressDialog);
      }

      if (statusListener != null)
      {
        statusListener.setStatus(StatusType.INFORMATION, messages.getString
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.output.ReportProcessor

    final StreamHtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor(report.getConfiguration());
    //outputProcessor.setFlowSelector(new DisplayAllInterceptor());
    final HtmlPrinter printer = new SingleItemHtmlPrinter(report.getResourceManager(), null);

    outputProcessor.setPrinter(printer);
    final ReportProcessor srp = new StreamReportProcessor(report, outputProcessor);
    srp.processReport();

  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.output.ReportProcessor

        final FileOutputStream fout = new FileOutputStream(tempFile);
        try
        {
          final BufferedOutputStream bout = new BufferedOutputStream(fout);
          ReportStructureValidator validator = new ReportStructureValidator();
          ReportProcessor reportProcessor;
          if (validator.isValidForFastProcessing(report) == false)
          {
            final FlowExcelOutputProcessor target =
                new FlowExcelOutputProcessor(report.getConfiguration(), bout, report.getResourceManager());
            target.setUseXlsxFormat(true);
            reportProcessor = new FlowReportProcessor(report, target);
          }
          else
          {
            reportProcessor = new FastExcelExportProcessor(report, bout, true);
          }

          reportProcessor.addReportProgressListener(progressDialog);
          progressDialog.setVisibleInEDT(true);

          reportProcessor.processReport();
          reportProcessor.close();
          bout.flush();
          reportProcessor.removeReportProgressListener(progressDialog);
        }
        finally
        {
          fout.close();
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.output.ReportProcessor

        try
        {
          final BufferedOutputStream bout = new BufferedOutputStream(fout);

          ReportStructureValidator validator = new ReportStructureValidator();
          ReportProcessor reportProcessor;
          if (validator.isValidForFastProcessing(report) == false)
          {
            final FlowExcelOutputProcessor target =
                new FlowExcelOutputProcessor(report.getConfiguration(), bout, report.getResourceManager());
            target.setUseXlsxFormat(false);
            reportProcessor = new FlowReportProcessor(report, target);
          }
          else
          {
            reportProcessor = new FastExcelExportProcessor(report, bout, false);
          }

          reportProcessor.addReportProgressListener(progressDialog);
          progressDialog.setVisibleInEDT(true);

          reportProcessor.processReport();
          reportProcessor.close();
          bout.flush();
          reportProcessor.removeReportProgressListener(progressDialog);
        }
        finally
        {
          fout.close();
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.output.ReportProcessor

        try
        {

          final BufferedOutputStream bout = new BufferedOutputStream(fout);

          ReportProcessor reportProcessor;
          ReportStructureValidator validator = new ReportStructureValidator();
          if (validator.isValidForFastProcessing(report) == false)
          {
            final StreamCSVOutputProcessor target = new StreamCSVOutputProcessor(bout);
            reportProcessor = new StreamReportProcessor(report, target);
          }
          else
          {
            reportProcessor = new FastCsvExportProcessor(report, bout);
          }

          reportProcessor.addReportProgressListener(progressDialog);
          progressDialog.setVisibleInEDT(true);

          reportProcessor.processReport();
          reportProcessor.close();
          bout.flush();
          reportProcessor.removeReportProgressListener(progressDialog);
        }
        finally
        {
          fout.close();
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.output.ReportProcessor

        {
          final FileRepository targetRepository = new FileRepository(tempDir);
          final ContentLocation targetRoot = targetRepository.getRoot();


          ReportProcessor reportProcessor;
          ReportStructureValidator validator = new ReportStructureValidator();
          if (validator.isValidForFastProcessing(report) == false)
          {
            final HtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor(report.getConfiguration());
            final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
            printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, "index", "html"));
            printer.setDataWriter(targetRoot, new DefaultNameGenerator(targetRoot, "content")); //$NON-NLS-1$
            printer.setUrlRewriter(new FileSystemURLRewriter());
            outputProcessor.setPrinter(printer);
            reportProcessor = new StreamReportProcessor(report, outputProcessor);
          }
          else
          {
            FastHtmlContentItems printer = new FastHtmlContentItems();
            printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, "index", "html"));
            printer.setDataWriter(targetRoot, new DefaultNameGenerator(targetRoot, "content")); //$NON-NLS-1$
            printer.setUrlRewriter(new FileSystemURLRewriter());
            reportProcessor = new FastHtmlExportProcessor(report, printer);
          }

          reportProcessor.addReportProgressListener(progressDialog);
          progressDialog.setVisibleInEDT(true);

          reportProcessor.processReport();
          reportProcessor.close();

          reportProcessor.removeReportProgressListener(progressDialog);
          progressDialog.setVisibleInEDT(false);

          final File previewFile = new File(tempDir, "index.html");//$NON-NLS-1$
          ExternalToolLauncher.openURL(previewFile.toURI().toURL().toExternalForm());
        }
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.