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

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


  protected boolean isNeedPrintRepeatingFooter(final ReportEvent event,
                                               final LayouterLevel[] levels)
  {
    final ReportDefinition report = event.getReport();
    final ReportState state = event.getState();
    final int groupsPrinted = state.getPresentationGroupIndex();
    final int levelCount = levels.length;
    final DataRow dataRow = event.getDataRow();

    if (repeatingFooterValidator.isRepeatFooterValid(event, levels) == false)
    {
      return true;
    }

    boolean needPrinting = clearedFooter;
    if (needPrinting == false && state.isInItemGroup())
    {
      final DetailsFooter footer = report.getDetailsFooter();
      if (isGroupSectionPrintableInternal(footer, false, true) &&
          elementChangeChecker.isBandChanged(footer, dataRow))
      {
View Full Code Here


    bits.clear();

    int count = 0;

    final ReportDefinition report = event.getReport();
    final ReportState state = event.getState();
    final int groupsPrinted = state.getPresentationGroupIndex();
    final int levelCount = levels.length;

    for (int i = 0; i < levelCount; i++)
    {
      final LayouterLevel level = levels[i];
      final ReportDefinition def = level.getReportDefinition();

      for (int gidx = level.getGroupIndex(); gidx >= 0; gidx -= 1)
      {
        final Group g = def.getGroup(gidx);
        if (g instanceof RelationalGroup)
        {
          final RelationalGroup rg = (RelationalGroup) g;
          final GroupFooter footer = rg.getFooter();
          bits.set(count, DefaultOutputFunction.isGroupSectionPrintable(footer, true, true));
          count += 1;
        }
      }

      if (level.isInItemGroup())
      {
        final DetailsFooter detailsFooter = def.getDetailsFooter();
        if (detailsFooter != null)
        {
          bits.set(count, DefaultOutputFunction.isGroupSectionPrintable(detailsFooter, true, true));
          count += 1;
        }
      }

    }


    /**
     * Repeating group header are only printed while ItemElements are
     * processed.
     */
    for (int gidx = groupsPrinted; gidx >= 0; gidx -= 1)
    {
      final Group g = report.getGroup(gidx);
      if (g instanceof RelationalGroup)
      {
        final RelationalGroup rg = (RelationalGroup) g;
        final GroupFooter footer = rg.getFooter();
        bits.set(count, DefaultOutputFunction.isGroupSectionPrintable(footer, false, true));
        count += 1;
      }
    }

    if (state.isInItemGroup())
    {
      final DetailsFooter footer = report.getDetailsFooter();
      bits.set(count, DefaultOutputFunction.isGroupSectionPrintable(footer, false, true));
      count += 1;
    }
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

      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()), isReportsShareConnections(report));
    if (dataFactory == null)
View Full Code Here

    {
      return;
    }
    if (parentRow != null)
    {
      final ReportState parentState = event.getState().getParentSubReportState();
      final ReportEvent deepEvent;
      if (parentState == null)
      {
        deepEvent = event;
      }
View Full Code Here

   *
   * @param event the event.
   */
  public void groupStarted(final ReportEvent event)
  {
    final ReportState state = event.getState();
    if (event.getLevel() == getDependencyLevel())
    {
      final Group group = event.getReport().getGroup(state.getCurrentGroupIndex());
      if (group instanceof CrosstabGroup)
      {
        final CrosstabGroup crosstabGroup = (CrosstabGroup) group;
        // yeay! we encountered a crosstab.
        if (processingStack == null)
        {
          processingStack = new FastStack<CrosstabSpecification>();
        }
        final String[] columnSet = computeColumns(crosstabGroup);
        final String[] rowSet = computeRows(crosstabGroup);
        final ReportStateKey processKey = state.getProcessKey();

        final CrosstabNormalizationMode normalizationMode = (CrosstabNormalizationMode)
            group.getAttribute(AttributeNames.Crosstab.NAMESPACE, AttributeNames.Crosstab.NORMALIZATION_MODE);
        if (CrosstabNormalizationMode.Insertation.equals(normalizationMode))
        {
View Full Code Here

    if (csstate == null)
    {
      return;
    }

    final ReportState state = event.getState();
    if (event.getLevel() == getDependencyLevel())
    {
      final Group group = event.getReport().getGroup(state.getCurrentGroupIndex());
      if (group instanceof CrosstabGroup)
      {
        csstate.endCrosstab();
        result = processingStack.pop();
        return;
View Full Code Here

    return length;
  }

  public void fireReportEvent(final ReportEvent event)
  {
    final ReportState reportState = event.getState();
    runtime.setState(reportState.createGroupingState());
    runtime.setCrosstabInfo(reportState.isStructuralPreprocessingNeeded(), reportState.isCrosstabActive());
    super.fireReportEvent(event);
    super.reactivateExpressions(event.isDeepTraversing());
  }
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.