Examples of GroupBody


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

    }

    int result = 0; // we always have at least a default-group.

    Group existingGroup = rootGroup;
    GroupBody gb = existingGroup.getBody();
    while (gb != null)
    {
      final int count = gb.getElementCount();
      boolean found = false;
      for (int i = 0; i < count; i++)
      {
        final ReportElement element = gb.getElement(i);
        if (element instanceof Group)
        {
          existingGroup = (Group) element;
          result += 1;
          if (result == groupIndex)
View Full Code Here

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

  public ProcessState commit(final ProcessState next) throws ReportProcessingException
  {
    final Group group = next.getReport().getGroup(next.getCurrentGroupIndex());

    final GroupBody body = group.getBody();
    if (body instanceof CrosstabColumnGroupBody)
    {
      next.setAdvanceHandler(BeginCrosstabColumnAxisHandler.HANDLER);
    }
    else if (body instanceof GroupDataBody)
View Full Code Here

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

  public ProcessState commit(final ProcessState next) throws ReportProcessingException
  {
    final Group group = next.getReport().getGroup(next.getCurrentGroupIndex());

    final GroupBody body = group.getBody();
    if (body instanceof CrosstabRowGroupBody)
    {
      next.setAdvanceHandler(BeginCrosstabRowAxisHandler.HANDLER);
    }
    else if (body instanceof CrosstabOtherGroupBody)
View Full Code Here

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

  public ProcessState commit(final ProcessState next) throws ReportProcessingException
  {
    final Group group = next.getReport().getGroup(next.getCurrentGroupIndex());

    final GroupBody body = group.getBody();
    if (body instanceof CrosstabRowGroupBody)
    {
      next.setAdvanceHandler(BeginCrosstabRowAxisHandler.HANDLER);
    }
    else if (body instanceof CrosstabColumnGroupBody)
View Full Code Here

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

  public ProcessState commit(final ProcessState next) throws ReportProcessingException
  {
    final Group group = next.getReport().getGroup(next.getCurrentGroupIndex());

    final GroupBody body = group.getBody();
    if (body instanceof CrosstabRowGroupBody)
    {
      next.setAdvanceHandler(BeginCrosstabRowAxisHandler.HANDLER);
    }
    else if (body instanceof CrosstabOtherGroupBody)
View Full Code Here

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

  private List<SortConstraint> collectSortData(final Group rootGroup,
                                               final ArrayList<SortConstraint> sorts)
  {
    sorts.addAll(rootGroup.getSortingConstraint());
    GroupBody body = rootGroup.getBody();
    Group group = body.getGroup();
    if (group == null)
    {
      // todo: Allow additional sorting based on item/detail data?
      return sorts;
    }
View Full Code Here

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

    while (group instanceof RelationalGroup)
    {
      final RelationalGroup rgroup = (RelationalGroup) group;
      data.add(new GroupDataEntry(group.getObjectID(), group.getName(), rgroup.getFieldsArray()));

      final GroupBody body = rgroup.getBody();
      if (body instanceof SubGroupBody)
      {
        final SubGroupBody subGroupBody = (SubGroupBody) body;
        group = subGroupBody.getGroup();
      }
View Full Code Here

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

    {
      final RelationalGroup rgroup = (RelationalGroup) group;
      innermostGroup = rgroup;
      groups.put(group.getObjectID(), rgroup);

      final GroupBody body = rgroup.getBody();
      if (body instanceof SubGroupBody)
      {
        final SubGroupBody subGroupBody = (SubGroupBody) body;
        group = subGroupBody.getGroup();
      }
      else
      {
        group = null;
      }
    }

    final RelationalGroup[] resultGroups = new RelationalGroup[newEntries.length];
    for (int i = 0; i < newEntries.length; i++)
    {
      final GroupDataEntry o = newEntries[i];
      final RelationalGroup sourceGroup = groups.get(o.getInstanceID());
      if (sourceGroup == null)
      {
        resultGroups[i] = new RelationalGroup();
      }
      else
      {
        resultGroups[i] = sourceGroup;
      }

      resultGroups[i].setName(o.getName());
      resultGroups[i].setFieldsArray(o.getFields());
    }

    final GroupBody innermostBody;
    if (innermostGroup == null)
    {
      innermostBody = new SubGroupBody(abstractReportDefinition.getRootGroup());
    }
    else
    {
      innermostBody = innermostGroup.getBody();
    }

    if (resultGroups.length > 0)
    {
      for (int i = 0; i < resultGroups.length; i++)
      {
        final RelationalGroup resultGroup = resultGroups[i];
        if (i == 0)
        {
          abstractReportDefinition.setRootGroup(resultGroup);
        }
        else
        {
          final RelationalGroup prevGroup = resultGroups[i - 1];
          final GroupBody body = prevGroup.getBody();
          if (body instanceof SubGroupBody)
          {
            final SubGroupBody sgb = (SubGroupBody) body;
            sgb.setGroup(resultGroup);
          }
View Full Code Here

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

      else
      {
        break;
      }

      GroupBody body = group.getBody();
      if (body instanceof CrosstabCellBody)
      {
        cellBody = (CrosstabCellBody) body;
        break;
      }

      group = body.getGroup();
    }

    if (cellBody == null)
    {
      throw new IllegalStateException("A crosstab group can never be without a cell body");
View Full Code Here

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

      {
        return;
      }
      final RelationalGroup selectedGroup = (RelationalGroup) selectedElement;

      final GroupBody bodyElement = selectedGroup.getBody();
      if (bodyElement instanceof SubGroupBody)
      {
        final SubGroupBody subGroupBodyReportElement = (SubGroupBody) bodyElement;
        final Group oldBodyContent = subGroupBodyReportElement.getGroup();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.