Package org.pentaho.reporting.engine.classic.core.event

Examples of org.pentaho.reporting.engine.classic.core.event.ReportProgressEvent


    }
  }

  public boolean paginate() throws ReportProcessingException
  {
    fireProcessingStarted(new ReportProgressEvent(this));

    try
    {
      if (isPaginated() == false)
      {
        // Processes the whole report ..
        prepareReportProcessing();
      }
    }
    finally
    {
      fireProcessingFinished(new ReportProgressEvent(this));
    }
    return true;
  }
View Full Code Here


      }
      try
      {
        final long startTime = System.currentTimeMillis();

        fireProcessingStarted(new ReportProgressEvent(this));

        if (isPaginated() == false)
        {
          // Processes the whole report ..
          prepareReportProcessing();
        }
        PerformanceLoggingStopWatch sw =
            getPerformanceMonitorContext().createStopWatch(PerformanceTags.REPORT_GENERATE);
        try
        {
          sw.start();
          final long paginateTime = System.currentTimeMillis();
          if (AbstractReportProcessor.logger.isDebugEnabled())
          {
            AbstractReportProcessor.logger.debug(new MemoryUsageMessage
                (System.identityHashCode(Thread.currentThread()) +
                    ": Report processing time: Pagination time: " + ((paginateTime - startTime) / 1000.0)));
          }
          if (getLogicalPageCount() == 0)
          {
            throw new EmptyReportException("Report did not generate any content.");
          }

          // Start from scratch ...
          PageState state = getLogicalPageState(0);
          while (state != null)
          {
            state = processPage(state, true);
          }
          final long endTime = System.currentTimeMillis();
          if (AbstractReportProcessor.logger.isDebugEnabled())
          {
            AbstractReportProcessor.logger.debug(new MemoryUsageMessage
                (System.identityHashCode(Thread.currentThread()) +
                    ": Report processing time: " + ((endTime - startTime) / 1000.0)));
          }
        }
        finally
        {
          sw.close();
        }
      }
      catch (EmptyReportException re)
      {
        throw re;
      }
      catch (ReportProcessingException re)
      {
        AbstractReportProcessor.logger.error(System.identityHashCode(
            Thread.currentThread()) + ": Report processing failed.", re);
        throw re;
      }
      catch (Exception e)
      {
        AbstractReportProcessor.logger.error(System.identityHashCode(
            Thread.currentThread()) + ": Report processing failed.", e);
        throw new ReportProcessingException("Failed to process the report", e);
      }
      fireProcessingFinished(new ReportProgressEvent(this, getPhysicalPageCount()));
      if (AbstractReportProcessor.logger.isDebugEnabled())
      {
        AbstractReportProcessor.logger.debug(System.identityHashCode(
            Thread.currentThread()) + ": Report processing finished.");
      }
View Full Code Here

    throw new UnsupportedOperationException("Printing is a passive process.");
  }

  public void fireProcessingStarted()
  {
    fireProcessingStarted(new ReportProgressEvent(this));
  }
View Full Code Here

    fireProcessingStarted(new ReportProgressEvent(this));
  }

  public void fireProcessingFinished()
  {
    fireProcessingFinished(new ReportProgressEvent(this));
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.event.ReportProgressEvent

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.