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

Examples of org.pentaho.reporting.engine.classic.core.layout.Renderer


  {
    final int gidx = event.getState().getCurrentGroupIndex();
    final CrosstabOtherGroup g = (CrosstabOtherGroup) event.getReport().getGroup(gidx);
    final Band b = g.getFooter();

    final Renderer renderer = outputFunction.getRenderer();
    outputFunction.updateFooterArea(event);

    renderer.startSection(Renderer.SectionType.NORMALFLOW);
    renderer.add(b, outputFunction.getRuntime());
    outputFunction.addSubReportMarkers(renderer.endSection());
    renderer.endGroup();
  }
View Full Code Here


    clearPendingPageStart(event, true);
  }

  public boolean createRollbackInformation()
  {
    final Renderer commitableRenderer = getRenderer();
    commitableRenderer.createRollbackInformation();
    return true;
  }
View Full Code Here

          }
          continue;
        }

        final DefaultOutputFunction lm = (DefaultOutputFunction) outputFunction;
        final Renderer renderer = lm.getRenderer();
        renderer.setStateKey(state.getProcessKey());
        pagebreakHandler.setReportState(state);

        boolean assertExpectPagebreak = false;
        if (isInRollBackMode)
        {
          if (nextStateKey.equals(rollbackPageState))
          {
            // reached the border case. We have to insert a manual pagebreak here or at least
            // we have to force the renderer to end the page right now.
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              AbstractReportProcessor.logger.debug(
                  "Paginate: Found real pagebreak position. This might be the last state we process: " + rollbackPageState);
              AbstractReportProcessor.logger.debug(
                  "Paginate:   (Current state process key)           : " + state.getProcessKey());
              AbstractReportProcessor.logger.debug(
                  "Paginate:   (Handler)                             : " + state.getAdvanceHandler().getClass().getName());
            }
            assertExpectPagebreak = true;
            renderer.addPagebreak();
          }
        }

        final Renderer.LayoutResult pagebreakEncountered = renderer.validatePages();
        if (AbstractReportProcessor.SHOW_ROLLBACKS)
        {
          AbstractReportProcessor.logger.debug("Paginate: Validate Page returned " + pagebreakEncountered);
          if (assertExpectPagebreak == true && pagebreakEncountered != Renderer.LayoutResult.LAYOUT_PAGEBREAK)
          {
            AbstractReportProcessor.logger.debug("Paginate: Missed the pagebreak. This smells fishy!");
          }
        }

        if (pagebreakEncountered != Renderer.LayoutResult.LAYOUT_UNVALIDATABLE)
        {
          if (pagebreaksSupported && state.isArtifcialState() == false)
          {
            if (isInRollBackMode == false)
            {
              if (pageEventCount >= AbstractReportProcessor.COMMIT_RATE)
              {
                if (AbstractReportProcessor.SHOW_ROLLBACKS)
                {
                  logger.debug("Paginate: Try to apply new fallback state after commit count reached: " + state.getProcessKey());
                  logger.debug("Paginate:        : " + renderer.getLastStateKey());
                }

                fallBackState = realFallbackState;
                pageEventCount = 0;
              }
              else
              {
                if (AbstractReportProcessor.SHOW_ROLLBACKS)
                {
                  logger.debug("Paginate: Increase counter: " + state.getProcessKey());
                }
                pageEventCount += 1;
              }
            }
          }
        }
        else if (AbstractReportProcessor.SHOW_ROLLBACKS)
        {
          if (pagebreaksSupported && state.isArtifcialState() == false)
          {
            if (isInRollBackMode == false)
            {
              logger.debug("Paginate: SKIP : " + state.getProcessKey());
            }
          }
        }

        if (pagebreakEncountered == Renderer.LayoutResult.LAYOUT_PAGEBREAK)
        {
          final boolean onGoingPageBreak;

//          renderer.print();
          final ReportStateKey lastVisibleStateKey = renderer.getLastStateKey();
          if (isPagebreaksSupported() &&
              isInRollBackMode == false &&
              lastVisibleStateKey != null &&
              renderer.isOpen())
          {
            if (lastVisibleStateKey.equals(nextStateKey) == false &&
                lastVisibleStateKey.getSequenceCounter() > globalState.getProcessKey().getSequenceCounter())
            {
              // Roll back to the last known to be good position and process the states up to, but not
              // including the current state. This way, we can fire the page-events *before* this band
              // gets printed.
              rollbackPageState = lastVisibleStateKey;

              final ReportStateKey restoreStateProcessKey = restoreState.getProcessKey();
              if (AbstractReportProcessor.SHOW_ROLLBACKS)
              {
                AbstractReportProcessor.logger.debug(
                    "Paginate: Encountered bad break, need to roll-back: " + rollbackPageState);
                AbstractReportProcessor.logger.debug(
                    "Paginate:    Next StateKey                        : " + state.getProcessKey());
                AbstractReportProcessor.logger.debug(
                    "Paginate:    Restored Key                         : " + restoreStateProcessKey);
                AbstractReportProcessor.logger.debug(
                    "Paginate:    Position in event chain              : " + restoreState.getSequenceCounter());
              }
              if (lastVisibleStateKey.getSequenceCounter() < restoreStateProcessKey.getSequenceCounter())
              {
                if (AbstractReportProcessor.SHOW_ROLLBACKS)
                {
                  AbstractReportProcessor.logger.debug(
                      "Paginate: Fall back to start of page              : " + globalState.getProcessKey());
                }
                if (lastVisibleStateKey.getSequenceCounter() <= globalState.getProcessKey().getSequenceCounter())
                {
                  throw new ReportProcessingException("Paginate: Error, fallback position is after last visible state.");
                }
                state = globalState.deriveForStorage();
              }
              else
              {
                if (AbstractReportProcessor.SHOW_ROLLBACKS)
                {
                  AbstractReportProcessor.logger.debug(
                      "Paginate: Fall back to save-state                 : " + restoreStateProcessKey);
                }
                state = restoreState.deriveForPagebreak();
              }

              final DefaultOutputFunction rollbackOutputFunction = (DefaultOutputFunction) state.getLayoutProcess().getOutputFunction();
              final Renderer rollbackRenderer = rollbackOutputFunction.getRenderer();
              rollbackRenderer.rollback();

              validate(state);

              isInRollBackMode = true;
              fallBackState = null; // there is no way we can fall-back inside a roll-back ..
              continue;
            }

            // when (lastVisibleStateKey.equals(nextStateKey))

            // The current state printed content partially on the now finished page and there is more
            // content on the currently open page. This is a in-between pagebreak, we invoke a pagebreak
            // after this state has been processed.
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              AbstractReportProcessor.logger.debug("Paginate: Encountered on-going break " + lastVisibleStateKey);
            }

            onGoingPageBreak = true;
            rollbackPageState = null;
          }
          else
          {
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              if (isInRollBackMode)
              {
                AbstractReportProcessor.logger.debug("Paginate: Encountered a roll-back break: " + isInRollBackMode);
                if (assertExpectPagebreak == false)
                {
                  AbstractReportProcessor.logger.debug("Paginate: next state:     " + nextStateKey);
                  if (nextStateKey.equals(rollbackPageState) == false)
                  {
                    AbstractReportProcessor.logger.debug("Paginate: rollback state: " + rollbackPageState);
                  }
                }
              }
              else
              {
                AbstractReportProcessor.logger.debug("Paginate: Encountered a good break: " + isInRollBackMode);
              }
              AbstractReportProcessor.logger.debug
                  ("Paginate:                                              : " + state.getProcessKey());
            }
            isInRollBackMode = false;
            rollbackPageState = null;
            onGoingPageBreak = false;
          }

          if (isPagebreaksSupported() == false)
          {
            // The commit causes all closed-nodes to become finishable. This allows the process-page
            // and the incremental-update methods to remove the nodes. For non-streaming targets (where
            // pagebreaks are possible) the commit state is managed manually
            renderer.applyAutoCommit();
          }

          if (renderer.processPage(pagebreakHandler, state.getProcessKey(), true) == false)
          {
            throw new IllegalStateException
                ("This cannot be. If the validation said we get a new page, how can we now get lost here");
          }

          if (isPagebreaksSupported())
          {
            if (renderer.isPendingPageHack() && renderer.isCurrentPageEmpty() == false && renderer.isPageStartPending() == false)
            {
              if (AbstractReportProcessor.SHOW_ROLLBACKS)
              {
                logger.debug("Paginate: Delaying next event to allow pending pages to be processed: " + state.getProcessKey());
              }
              state = PendingPagesHandler.create(state);
            }
            else
            {
              if (AbstractReportProcessor.SHOW_ROLLBACKS)
              {
                logger.debug("Paginate: Adding RestartOnNewPageHandler to open Page in time: " + state.getProcessKey());
              }
              state = RestartOnNewPageHandler.create(state.commit());
            }
          }
          else
          {
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              logger.debug("Paginate: Commit on page-break: " + state.getProcessKey() + " " + state.getAdvanceHandler().getClass().getName());
            }
            state = state.commit();
          }

          if (onGoingPageBreak)
          {
            renderer.setStateKey(state.getProcessKey());
            renderer.addProgressBox();
          }

          if (AbstractReportProcessor.SHOW_ROLLBACKS)
          {
            logger.debug("Paginate: Post Commit: " + state.getProcessKey() + " " + state.getAdvanceHandler().getClass().getName());
          }

          // can continue safely ..
          final int newLogPageCount = outputProcessor.getLogicalPageCount();
          final int newPhysPageCount = outputProcessor.getPhysicalPageCount();

          final int result = pageStates.size() - 1;
          for (; physPageCount < newPhysPageCount; physPageCount++)
          {
            physicalMapping.add(result);
          }

          for (; logPageCount < newLogPageCount; logPageCount++)
          {
            logicalMapping.add(result);
          }

          if (state.isFinish() == false)
          {
            // A pagebreak has occured ...
            // We add all but the last state ..
            final PageState pageState = new PageState(state, outputProcessor.getPageCursor());
            pageStates.add(pageState);
          }

          if (isPagebreaksSupported())
          {
            fallBackState = state.deriveForPagebreak();
            globalState = state.deriveForStorage();
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              logger.debug("Paginate: Generating new fallback state after pagebreak found: " + state.getProcessKey());
            }
            pageEventCount = 0;
            eventCount = 0;
          }
        }
        else
        {
          if (isPagebreaksSupported() == false)
          {
            renderer.applyAutoCommit();
          }

          // PageEventCount is zero on streaming exports and zero after a new rollback event is created.
          if (pageEventCount == 0 && isInRollBackMode == false &&
              pagebreakEncountered == Renderer.LayoutResult.LAYOUT_NO_PAGEBREAK)
          {
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              logger.debug("Paginate: Perform incremental update: " + state.getProcessKey());
            }
            renderer.processIncrementalUpdate(false);
          }
          if (AbstractReportProcessor.SHOW_ROLLBACKS)
          {
            logger.debug("Paginate: Commit: " + state.getProcessKey() + " " + state.getAdvanceHandler().getClass().getName());
          }
          state = state.commit();
          if (AbstractReportProcessor.SHOW_ROLLBACKS)
          {
            logger.debug("Paginate: Post Commit: " + state.getProcessKey() + " " + state.getAdvanceHandler().getClass().getName());
          }

//          printLayoutStateToFile(state, false, isInRollBackMode);

          if (pagebreaksSupported && fallBackState != restoreState)
          {
            final DefaultOutputFunction commitableOutputFunction =
                (DefaultOutputFunction) state.getLayoutProcess().getOutputFunction();
            final Renderer commitableRenderer = commitableOutputFunction.getRenderer();
            commitableRenderer.applyRollbackInformation();
          }
        }

      }
      return initialReportState;
View Full Code Here

    {
      return 0;
    }

    final DefaultOutputFunction lm = (DefaultOutputFunction) outputFunction;
    final Renderer renderer = lm.getRenderer();
    return renderer.getPageCount() + 1;
  }
View Full Code Here

        return;
      }

      final DefaultOutputFunction of = (DefaultOutputFunction) outputFunction;

      final Renderer renderer = of.getRenderer();
      if (renderer instanceof AbstractRenderer)
      {
        final AbstractRenderer r = (AbstractRenderer) renderer;
        r.performParanoidModelCheck();
      }
View Full Code Here

          state = state.commit();
          continue;
        }

        final DefaultOutputFunction lm = (DefaultOutputFunction) outputFunction;
        final Renderer renderer = lm.getRenderer();
        renderer.setStateKey(state.getProcessKey());
        pagebreakHandler.setReportState(state);

        boolean assertExpectPagebreak = false;
        if (isInRollBackMode)
        {
          if (nextStateKey.equals(rollbackPageState))
          {
            // reached the border case. We have to insert a manual pagebreak here or at least
            // we have to force the renderer to end the page right now.
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              AbstractReportProcessor.logger.debug(
                  "Print: Found real pagebreak position. This might be the last state we process: " + rollbackPageState);
              AbstractReportProcessor.logger.debug(
                  "Print:   (Current state process key)           : " + state.getProcessKey());
              AbstractReportProcessor.logger.debug(
                  "Print:   (Handler)                             : " + state.getAdvanceHandler().getClass().getName());
            }
            assertExpectPagebreak = true;
            renderer.addPagebreak();
          }
        }

        final Renderer.LayoutResult pagebreakEncountered = renderer.validatePages();
        if (AbstractReportProcessor.SHOW_ROLLBACKS)
        {
          AbstractReportProcessor.logger.debug("Print: Validate Page returned " + pagebreakEncountered);
          if (assertExpectPagebreak == true && pagebreakEncountered != Renderer.LayoutResult.LAYOUT_PAGEBREAK)
          {
            AbstractReportProcessor.logger.debug("Print: Missed the pagebreak. This smells fishy!");
          }
        }

        if (pagebreakEncountered != Renderer.LayoutResult.LAYOUT_UNVALIDATABLE)
        {
          if (pagebreaksSupported && state.isArtifcialState() == false)
          {
            if (isInRollBackMode == false)
            {
              if (pageEventCount >= AbstractReportProcessor.COMMIT_RATE)
              {
                if (AbstractReportProcessor.SHOW_ROLLBACKS)
                {
                  logger.debug("Print: Try to apply new fallback state after commit count reached: " + state.getProcessKey());
                  logger.debug("Print:        : " + renderer.getLastStateKey());
                }
                fallBackState = realFallbackState;
                pageEventCount = 0;
              }
              else
              {
                if (AbstractReportProcessor.SHOW_ROLLBACKS)
                {
                  logger.debug("Print: Increase counter: " + state.getProcessKey());
                }
                pageEventCount += 1;
              }
            }
          }
        }
        else if (AbstractReportProcessor.SHOW_ROLLBACKS)
        {
          if (pagebreaksSupported && state.isArtifcialState() == false)
          {
            if (isInRollBackMode == false)
            {
              logger.debug("Print: SKIP : " + state.getProcessKey());
            }
          }
        }

        if (pagebreakEncountered == Renderer.LayoutResult.LAYOUT_PAGEBREAK)
        {
          final boolean onGoingPageBreak;

          final ReportStateKey lastVisibleStateKey = renderer.getLastStateKey();
          if (pagebreaksSupported &&
              isInRollBackMode == false &&
              renderer.isOpen() &&
              lastVisibleStateKey != null)
          {
            if (lastVisibleStateKey.equals(nextStateKey) == false &&
                lastVisibleStateKey.getSequenceCounter() > globalState.getProcessKey().getSequenceCounter())
            {
              // Roll back to the last known to be good position and process the states up to, but not
              // including the current state. This way, we can fire the page-events *before* this band
              // gets printed.
              rollbackPageState = lastVisibleStateKey;

              final ReportStateKey restoreStateProcessKey = restoreState.getProcessKey();
              if (AbstractReportProcessor.SHOW_ROLLBACKS)
              {
                AbstractReportProcessor.logger.debug(
                    "Print: Encountered bad break, need to roll-back: " + rollbackPageState);
                AbstractReportProcessor.logger.debug(
                    "Print:    Next StateKey                        : " + state.getProcessKey());
                AbstractReportProcessor.logger.debug(
                    "Print:    Restored Key                         : " + restoreStateProcessKey);
                AbstractReportProcessor.logger.debug(
                    "Print:    Position in event chain              : " + restoreState.getSequenceCounter());
              }

              if (lastVisibleStateKey.getSequenceCounter() < restoreStateProcessKey.getSequenceCounter())
              {
                if (AbstractReportProcessor.SHOW_ROLLBACKS)
                {
                  AbstractReportProcessor.logger.debug(
                      "Print: Fall back to start of page              : " + globalState.getProcessKey());
                }
                if (lastVisibleStateKey.getSequenceCounter() <= globalState.getProcessKey().getSequenceCounter())
                {
                  throw new ReportProcessingException("Print: Error, fallback position is after last visible state.");
                }
                state = globalState.deriveForStorage();
              }
              else
              {
                if (AbstractReportProcessor.SHOW_ROLLBACKS)
                {
                  AbstractReportProcessor.logger.debug(
                      "Print: Fall back to save-state                 : " + restoreStateProcessKey);
                }
                state = restoreState.deriveForPagebreak();
              }

              final DefaultOutputFunction rollbackOutputFunction = (DefaultOutputFunction) state.getLayoutProcess().getOutputFunction();
              final Renderer rollbackRenderer = rollbackOutputFunction.getRenderer();
              rollbackRenderer.rollback();

              validate(state);

              isInRollBackMode = true;
              continue;
            }

            // The current state printed content partially on the now finished page and there is more
            // content on the currently open page. This is a in-between pagebreak, we invoke a pagebreak
            // after this state has been processed.
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              AbstractReportProcessor.logger.debug("Print: Encountered on-going break " + lastVisibleStateKey);
            }

            onGoingPageBreak = true;
            rollbackPageState = null;
          }
          else
          {
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              if (isInRollBackMode)
              {
                if (assertExpectPagebreak == false)
                {
                  AbstractReportProcessor.logger.debug("Print: Encountered a roll-back break: " + isInRollBackMode);
                  if (assertExpectPagebreak == false)
                  {
                    AbstractReportProcessor.logger.debug("Print: next state:     " + nextStateKey);
                    if (nextStateKey.equals(rollbackPageState) == false)
                    {
                      AbstractReportProcessor.logger.debug("Print: rollback state: " + rollbackPageState);
                    }
                  }
                }
              }
              else
              {
                AbstractReportProcessor.logger.debug("Print: Encountered a good break: " + isInRollBackMode);
              }
              AbstractReportProcessor.logger.debug
                  ("Print:                                              : " + state.getProcessKey());
            }
            onGoingPageBreak = false;
          }
          if (pagebreaksSupported == false)
          {
            // The commit causes all closed-nodes to become finishable. This allows the process-page
            // and the incremental-update methods to remove the nodes. For non-streaming targets (where
            // pagebreaks are possible) the commit state is managed manually
            renderer.applyAutoCommit();
          }

          if (renderer.processPage(pagebreakHandler, state.getProcessKey(), performOutput) == false)
          {
            throw new IllegalStateException("This must not be.");
          }

          if (isPagebreaksSupported())
          {
            if (renderer.isPendingPageHack() &&
                renderer.isCurrentPageEmpty() == false && renderer.isPageStartPending() == false)
            {
              if (AbstractReportProcessor.SHOW_ROLLBACKS)
              {
                logger.debug("Print: Delaying next event to allow pending pages to be processed: " + state.getProcessKey());
              }
              state = PendingPagesHandler.create(state);
            }
            else
            {
              if (AbstractReportProcessor.SHOW_ROLLBACKS)
              {
                logger.debug("Print: Adding RestartOnNewPageHandler to open Page in time: " + state.getProcessKey());
              }
              state = RestartOnNewPageHandler.create(state.commit());
            }
          }
          else
          {
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              logger.debug("Print: Commit on page-break: " + state.getProcessKey() + " " + state.getAdvanceHandler().getClass().getName());
            }
            state = state.commit();
          }

          if (onGoingPageBreak)
          {
            renderer.setStateKey(state.getProcessKey());
            renderer.addProgressBox();
          }

          if (AbstractReportProcessor.SHOW_ROLLBACKS)
          {
            logger.debug("Print: Post Commit: " + state.getProcessKey() + " " + state.getAdvanceHandler().getClass().getName());
          }

          if (isPagebreaksSupported())
          {
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              logger.debug("Print: Generating new fallback state after pagebreak found: " + state.getProcessKey());
            }
          }

          if (renderer.isOpen())
          {
            // No need to create a copy here. It is part of the contract that the resulting page state must be
            // cloned before it can be used again. The only place where it is used is this method, so we can
            // be pretty sure that this contract is valid.
            return new PageState(state, outputProcessor.getPageCursor());
          }
        }
        else
        {
          if (pagebreaksSupported == false)
          {
            // The commit causes all closed-nodes to become finishable. This allows the process-page
            // and the incremental-update methods to remove the nodes. For non-streaming targets (where
            // pagebreaks are possible) the commit state is managed manually
            renderer.applyAutoCommit();
          }

          if (pageEventCount == 0 && isInRollBackMode == false &&
              pagebreakEncountered == Renderer.LayoutResult.LAYOUT_NO_PAGEBREAK)
          {
            if (AbstractReportProcessor.SHOW_ROLLBACKS)
            {
              logger.debug("Print: Perform incremental update: " + state.getProcessKey());
            }
            renderer.processIncrementalUpdate(performOutput);
          }
          if (AbstractReportProcessor.SHOW_ROLLBACKS)
          {
            logger.debug("Print: Commit: " + state.getProcessKey() + " " + state.getAdvanceHandler().getClass().getName());
          }
          state = state.commit();
          if (AbstractReportProcessor.SHOW_ROLLBACKS)
          {
            logger.debug("Print: Post Commit: " + state.getProcessKey() + " " + state.getAdvanceHandler().getClass().getName());
          }

          // printLayoutStateToFile(state, true, isInRollBackMode);

          if (pagebreaksSupported && fallBackState != restoreState)
          {
            final DefaultOutputFunction commitableOutputFunction =
                (DefaultOutputFunction) state.getLayoutProcess().getOutputFunction();
            final Renderer commitableRenderer = commitableOutputFunction.getRenderer();
            commitableRenderer.applyRollbackInformation();
          }
        }
      }

      // We should never reach this point, if this function has been called by the PageStateList.
View Full Code Here

    final RelationalGroup group = (RelationalGroup) event.getReport().getGroup(gidx);
    final Band b = group.getHeader();
    final GroupBody groupBody = group.getBody();

    outputFunction.updateFooterArea(event);
    final Renderer renderer = outputFunction.getRenderer();
    renderer.startGroup(group, event.getState().getPredictedStateCount());
    renderer.startSection(Renderer.SectionType.NORMALFLOW);
    outputFunction.print(outputFunction.getRuntime(), b);
    outputFunction.addSubReportMarkers(renderer.endSection());
    renderer.startGroupBody(groupBody, event.getState().getPredictedStateCount());
  }
View Full Code Here

  public void itemsStarted(final DefaultOutputFunction outputFunction,
                           final ReportEvent event) throws ReportProcessingException
  {
    // activating this state after the page has ended is invalid.
    final int numberOfRows = event.getState().getNumberOfRows();
    final Renderer renderer = outputFunction.getRenderer();
    outputFunction.updateFooterArea(event);

    final DetailsHeader detailsHeader = event.getReport().getDetailsHeader();
    if (detailsHeader != null)
    {
      renderer.startSection(Renderer.SectionType.NORMALFLOW);
      outputFunction.print(outputFunction.getRuntime(), detailsHeader);
      outputFunction.addSubReportMarkers(renderer.endSection());
    }

    if (numberOfRows == 0 || outputFunction.getMetaData().isFeatureSupported(OutputProcessorFeature.DESIGNTIME))
    {
      // ups, we have no data. Lets signal that ...
      final NoDataBand noDataBand = event.getReport().getNoDataBand();
      if (noDataBand != null)
      {
        renderer.startSection(Renderer.SectionType.NORMALFLOW);
        outputFunction.print(outputFunction.getRuntime(), noDataBand);
        outputFunction.addSubReportMarkers(renderer.endSection());
        // there will be no item-band printed.
      }
    }

  }
View Full Code Here

  }

  public void itemsAdvanced(final DefaultOutputFunction outputFunction,
                            final ReportEvent event) throws ReportProcessingException
  {
    final Renderer renderer = outputFunction.getRenderer();
    outputFunction.updateFooterArea(event);


    final ItemBand itemBand = event.getReport().getItemBand();
    if (itemBand != null)
    {
      renderer.startSection(Renderer.SectionType.NORMALFLOW);
      outputFunction.print(outputFunction.getRuntime(), itemBand);
      outputFunction.addSubReportMarkers(renderer.endSection());
    }
  }
View Full Code Here

  }

  public void itemsFinished(final DefaultOutputFunction outputFunction,
                            final ReportEvent event) throws ReportProcessingException
  {
    final Renderer renderer = outputFunction.getRenderer();
    outputFunction.updateFooterArea(event);

    final DetailsFooter detailsFooter = event.getReport().getDetailsFooter();
    if (detailsFooter != null)
    {
      renderer.startSection(Renderer.SectionType.NORMALFLOW);
      ExpressionRuntime runtime = outputFunction.getRuntime();
      outputFunction.print(runtime, detailsFooter);
      outputFunction.addSubReportMarkers(renderer.endSection());
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.Renderer

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.