Package org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics

Examples of org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor


    if (jobName != null)
    {
      printerJob.setJobName(jobName);
    }

    final PrintReportProcessor reportPane = new PrintReportProcessor(report);
    if (progressListener != null)
    {
      reportPane.addReportProgressListener(progressListener);
    }
    printerJob.setPageable(reportPane);
    try
    {
      printerJob.setCopies(getNumberOfCopies(reportConfiguration));
      printerJob.print();
    }
    finally
    {
      reportPane.close();
      if (progressListener != null)
      {
        reportPane.removeReportProgressListener(progressListener);
      }
    }
  }
View Full Code Here


    if (jobName != null)
    {
      printerJob.setJobName(jobName);
    }

    final PrintReportProcessor reportPane = new PrintReportProcessor(report);
    if (progressListener != null)
    {
      reportPane.addReportProgressListener(progressListener);
    }

    try
    {
      reportPane.fireProcessingStarted();
      printerJob.setPageable(reportPane);
      printerJob.setCopies(getNumberOfCopies(reportConfiguration));
      if (printerJob.printDialog())
      {
        printerJob.print();
        return true;
      }
      return false;
    }
    finally
    {
      reportPane.fireProcessingFinished();
      reportPane.close();
      if (progressListener != null)
      {
        reportPane.removeReportProgressListener(progressListener);
      }
    }
  }
View Full Code Here

    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final Resource parsed = mgr.createDirectly(resource, MasterReport.class);
    final MasterReport report = (MasterReport) parsed.getResource();

    final PrintReportProcessor pr = new PrintReportProcessor(report);
    final int numberOfPages = pr.getNumberOfPages();
    assertEquals(4, numberOfPages);

    final ByteArrayOutputStream out = new ByteArrayOutputStream();
    PdfReportUtil.createPDF(report, out);
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor

Copyright © 2018 www.massapicom. 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.