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

Examples of org.pentaho.reporting.engine.classic.core.Group


        final LayouterLevel level = levels[i];
        final ReportDefinition def = level.getReportDefinition();

        for (int gidx = 0; gidx < level.getGroupIndex(); gidx++)
        {
          final Group g = def.getGroup(gidx);
          final GroupHeader header = g.getHeader();
          if (header.isSticky())
          {
            if (header.isRepeat())
            {
              print(level.getRuntime(), header);
            }
            else
            {
              printEmptyRootLevelBand();
            }
          }
        }

        if (level.isInItemGroup())
        {
          final DetailsHeader detailsHeader = def.getDetailsHeader();
          if (detailsHeader.isRepeat())
          {
            print(level.getRuntime(), detailsHeader);
          }
        }
      }

      final int groupsPrinted;
      if (groupStartPending || state.isInItemGroup() == false)
      {
        groupsPrinted = state.getCurrentGroupIndex() - 1;
      }
      else
      {
        groupsPrinted = state.getCurrentGroupIndex();
      }

      for (int gidx = 0; gidx <= groupsPrinted; gidx++)
      {
        final Group g = report.getGroup(gidx);
        final GroupHeader header = g.getHeader();
        if (header.isRepeat())
        {
          print(runtime, header);
        }
      }
View Full Code Here


     * processed.
     */
    final int groupsPrinted = state.getCurrentGroupIndex();
    for (int gidx = groupsPrinted; gidx >= 0; gidx -= 1)
    {
      final Group g = report.getGroup(gidx);
      final GroupFooter footer = g.getFooter();
      if (footer.isRepeat())
      {
        print(getRuntime(), footer);
        somethingSticks |= footer.isSticky();
      }
    }

    final LayouterLevel[] levels = DefaultOutputFunction.collectSubReportStates(event.getState(), getRuntime().getProcessingContext());
    final int levelCount = levels.length;
    for (int i = 0; i < levelCount; i++)
    {
      final LayouterLevel level = levels[i];
      final ReportDefinition def = level.getReportDefinition();

      if (level.isInItemGroup())
      {
        final DetailsFooter subDetailsFooter = report.getDetailsFooter();
        if (subDetailsFooter.isSticky())
        {
          if (subDetailsFooter.isRepeat())
          {
            print(level.getRuntime(), subDetailsFooter);
          }
          else
          {
            printEmptyRootLevelBand();
          }
          somethingSticks = true;
        }
        else if (somethingSticks)
        {
          printEmptyRootLevelBand();
        }
      }

      for (int gidx = level.getGroupIndex(); gidx >= 0; gidx -= 1)
      {
        final Group g = def.getGroup(gidx);
        final GroupFooter footer = g.getFooter();
        if (footer.isSticky())
        {
          if (footer.isRepeat())
          {
            print(level.getRuntime(), footer);
View Full Code Here

    }

    final int groupCount = report.getGroupCount();
    for (int i = 0; i < groupCount; i++)
    {
      final Group g = report.getGroup(i);
      if (g instanceof RelationalGroup)
      {
        groupList.add((RelationalGroup) g);
      }
      else
View Full Code Here

    final String groupName = attrs.getValue(getUri(), GroupReadHandler.NAME_ATT);
    if (groupName != null)
    {
      final AbstractReportDefinition report = (AbstractReportDefinition)
          getRootHandler().getHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME);
      final Group maybeDefaultGroup = report.getGroupByName(groupName);
      if (maybeDefaultGroup instanceof RelationalGroup)
      {
        group = (RelationalGroup) maybeDefaultGroup;
      }
      else
View Full Code Here

        getRootHandler().getHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME);

    final int groupCount = report.getGroupCount();
    for (int i = 0; i < groupCount; i++)
    {
      final Group g = report.getGroup(i);
      if (g instanceof RelationalGroup)
      {
        groupList.add((RelationalGroup) g);
      }
      else
View Full Code Here

    }

    final int groupCount = report.getGroupCount();
    for (int i = 0; i < groupCount; i++)
    {
      final Group g = report.getGroup(i);
      if (g instanceof RelationalGroup)
      {
        groupList.add((RelationalGroup) g);
      }
      else
View Full Code Here

    final String groupName = attrs.getValue(getUri(), GroupReadHandler.NAME_ATT);
    if (groupName != null)
    {
      final AbstractReportDefinition report = (AbstractReportDefinition)
          getRootHandler().getHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME);
      final Group maybeDefaultGroup = report.getGroupByName(groupName);
      if (maybeDefaultGroup instanceof RelationalGroup)
      {
        group = (RelationalGroup) maybeDefaultGroup;
      }
      else
View Full Code Here

    if (FunctionUtilities.isLayoutLevel(event) == false)
    {
      // dont do anything if there is no printing done ...
      return;
    }
    final Group group = FunctionUtilities.getCurrentGroup(event);
    processGroup(group);

    processFooterBands(event.getState());
  }
View Full Code Here

    while (state != null)
    {
      final ReportDefinition reportDefinition = state.getReport();
      processRootBand(reportDefinition.getPageFooter());
      processRootBand(reportDefinition.getDetailsFooter());
      Group g = reportDefinition.getRootGroup();
      while (g != null)
      {
        processRootBand(g.getFooter());
        final GroupBody body = g.getBody();
        if (body instanceof SubGroupBody == false)
        {
          break;
        }
View Full Code Here

  public void groupStarted(final ReportEvent event)
  {
    if (event.getState().isPrepareRun())
    {
      final int currentIndex = event.getState().getCurrentGroupIndex();
      final Group g = event.getReport().getGroup(currentIndex);
      collectSubReports(g.getHeader());
      return;
    }

    if (isEnableGroupHeader() == false)
    {
      final int currentIndex = event.getState().getCurrentGroupIndex();
      final Group g = event.getReport().getGroup(currentIndex);
      collectSubReports(g.getHeader());
      return;
    }

    try
    {
      final int currentIndex = event.getState().getCurrentGroupIndex();

      final CSVRow row = new CSVRow(quoter);
      if (isWriteStateColumns())
      {
        row.append(currentIndex);
        final Group g = event.getReport().getGroup(currentIndex);
        final String bandInfo = "groupheader name=\"" + g.getName() + '\"';
        row.append(bandInfo);
      }
      writeDataRow(event.getDataRow(), row);
      row.write(getWriter());

      final Group g = event.getReport().getGroup(currentIndex);
      collectSubReports(g.getHeader());
    }
    catch (IOException ioe)
    {
      throw new FunctionProcessingException("Error writing the current datarow", ioe);
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.Group

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.