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

Examples of org.pentaho.reporting.engine.classic.core.states.ReportState


    if (event == null)
    {
      throw new NullPointerException("ReportEvent is null");
    }

    final ReportState state = event.getState();
    if (state.isPrepareRun() == false)
    {
      return false;
    }
    return (state.getLevel() == f.getDependencyLevel());
  }
View Full Code Here


      throw new IllegalStateException();
    }
    state.setAdvanceHandler(BeginReportHandler.HANDLER);

    final ReportStateKey parentStateKey;
    final ReportState parentState = this.getParentSubReportState();
    if (parentState == null)
    {
      parentStateKey = null;
    }
    else
    {
      parentStateKey = parentState.getProcessKey();
    }

    final CachingDataFactory dataFactory = state.dataFactoryManager.restore
        (FunctionStorageKey.createKey(parentStateKey, state.getReport()));
    if (dataFactory == null)
View Full Code Here

    else
    {
      next.setAdvanceHandler(EndReportHandler.HANDLER);
    }
    final ReportStateKey parentStateKey;
    final ReportState parentState = next.getParentSubReportState();
    if (parentState == null)
    {
      parentStateKey = null;
    }
    else
    {
      parentStateKey = parentState.getProcessKey();
    }
    final FunctionStorageKey functionStorageKey =
        FunctionStorageKey.createKey(parentStateKey, next.getReport());
    next.getFunctionStorage().store (functionStorageKey, expressions, expressionDataRow.getColumnCount());
    final StructureFunction[] structureFunctions = next.getLayoutProcess().getCollectionFunctions();
View Full Code Here

    return level;
  }

  public void reuse(final int activity, final ReportState rawState, final int pageCount)
  {
    ReportState state = rawState;
    while (state.getParentState() != null)
    {
      state = state.getParentState();
    }
    reuse(activity, state.getCurrentRow(), state.getNumberOfRows(), pageCount,
        state.getProgressLevel(), state.getProgressLevelCount());
  }
View Full Code Here

  private ReportDefinition locateMasterReport(final ReportState state)
  {
    if (state.isSubReportEvent())
    {
      ReportState parentState = state.getParentState();
      if (parentState != null)
      {
        return locateMasterReport(parentState);
      }
    }
View Full Code Here

    if (event == null)
    {
      throw new NullPointerException("ReportEvent is null");
    }

    final ReportState state = event.getState();
    if (state.isPrepareRun() == false)
    {
      return false;
    }
    return (state.getLevel() == f.getDependencyLevel());
  }
View Full Code Here

      final ReportDefinition report = event.getReport();
      if (event.getState().isSubReportEvent() == false)
      {
        renderer.startReport(report, getRuntime().getProcessingContext(), event.getState().getPerformanceMonitorContext());

        final ReportState reportState = event.getState();
        final ExpressionRuntime runtime = getRuntime();
        try
        {
          reportState.firePageStartedEvent(reportState.getEventCode());
        }
        finally
        {
          // restore the current event, as the page-started event will clear it ..
          setRuntime(runtime);
View Full Code Here

  {
    if (processingContext == null)
    {
      throw new NullPointerException();
    }
    ReportState parentState = state.getParentSubReportState();
    if (parentState == null)
    {
      return EMPTY_LAYOUTER_LEVEL;
    }

    MasterDataRow dataRow = state.getFlowController().getMasterRow();
    dataRow = dataRow.getParentDataRow();
    if (dataRow == null)
    {
      throw new IllegalStateException("Parent-DataRow in a subreport-state must be defined.");
    }

    final ArrayList<LayouterLevel> stack = new ArrayList<LayouterLevel>();
    while (parentState != null)
    {
      if (parentState.isInlineProcess() == false)
      {
        final LayoutExpressionRuntime runtime = createRuntime(dataRow, parentState, processingContext);
        stack.add(new LayouterLevel(parentState.getReport(),
            parentState.getPresentationGroupIndex(), runtime, parentState.isInItemGroup()));
      }
      parentState = parentState.getParentSubReportState();
      dataRow = dataRow.getParentDataRow();
      if (dataRow == null)
      {
        throw new IllegalStateException("Parent-DataRow in a subreport-state must be defined.");
      }
View Full Code Here

  }

  protected void updateHeaderArea(final ReportState givenState)
      throws ReportProcessingException
  {
    ReportState state = givenState;
    while (state != null && state.isInlineProcess())
    {
      state = state.getParentSubReportState();
    }
    if (state == null)
    {
      return;
    }

    final ProcessingContext processingContext = getRuntime().getProcessingContext();
    final ReportDefinition report = state.getReport();
    LayouterLevel[] levels = null;
    ExpressionRuntime runtime = null;
    final OutputProcessorMetaData metaData = renderer.getOutputProcessor().getMetaData();
    if (metaData.isFeatureSupported(OutputProcessorFeature.WATERMARK_SECTION))
    {
View Full Code Here

  protected boolean updateRepeatingFooters(final ReportEvent event,
                                           final LayouterLevel[] levels) throws ReportProcessingException
  {
    final ReportDefinition report = event.getReport();
    final ReportState state = event.getState();
    final int groupsPrinted = state.getPresentationGroupIndex();
    final int levelCount = levels.length;

    final boolean needPrinting = isNeedPrintRepeatingFooter(event, levels);

    if (needPrinting == false)
    {
      avoidedRepeatingFooter += 1;
      return false;
    }

    renderer.startSection(Renderer.SectionType.REPEAT_FOOTER);

    if (state.isInItemGroup())
    {
      final DetailsFooter footer = report.getDetailsFooter();
      if (isGroupSectionPrintableInternal(footer, false, true))
      {
        print(getRuntime(), footer);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.states.ReportState

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.