Examples of ReportProcessor


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
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.