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

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


     */
    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);
          }
          else
          {
View Full Code Here


    {
      return new GroupHeader();
    }
    if ("group-footer".equals(elementType))
    {
      return new GroupFooter();
    }
    if ("itemband".equals(elementType))
    {
      return new ItemBand();
    }
View Full Code Here

    if (groupDefinition.getAggregationFunction() == null && (groupDefinition.getGroupTotalsLabel() == null || groupDefinition.getGroupTotalsLabel().length() == 0))
    {
      return;
    }

    final GroupFooter footer = group.getFooter();
    final Boolean repeat = footerDefinition.getRepeat();
    if (repeat != null)
    {
      footer.setRepeat(repeat.booleanValue());
    }

    final Band content = AutoGeneratorUtility.findGeneratedContent(footer);
    if (content == null)
    {
View Full Code Here

    if (groupDefinition.getAggregationFunction() == null)
    {
      return;
    }

    final GroupFooter footer = group.getFooter();
    final Boolean repeat = footerDefinition.getRepeat();
    if (repeat != null)
    {
      footer.setRepeat(repeat.booleanValue());
    }

    final Band content = AutoGeneratorUtility.findGeneratedContent(footer);
    if (content == null)
    {
View Full Code Here

      if ("org.pentaho.reportdesigner.crm.report.model.BandToplevelGroupReportElement".equals(type))
      {
        final String bandtype = atts.getValue(uri, "bandToplevelType");
        if ("GROUP_FOOTER".equals(bandtype))
        {
          footerReadHandler = new BandTopLevelElementReadHandler(new GroupFooter(), bandtype);
          return footerReadHandler;
        }
        if ("GROUP_HEADER".equals(bandtype))
        {
          headerReadHandler = new BandTopLevelElementReadHandler(new GroupHeader(), bandtype);
View Full Code Here

    header.addElement(tfactory.createElement());

    header.addElement(HorizontalLineElementFactory.createHorizontalLine(12, null, new BasicStroke(0.5f)));
    continentGroup.setHeader(header);

    final GroupFooter footer = new GroupFooter();
    footer.setName("Continent-Group-Footer");
    footer.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(20));
    header.getStyle().setStyleProperty(TextStyleKeys.FONT, "Monospaced");
    header.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
    header.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.TRUE);

    factory = new LabelElementFactory();
    factory.setName("Continent-Group-Footer Label");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(100, 12));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setText("Population:");
    footer.addElement(factory.createElement());

    final NumberFieldElementFactory nfactory = new NumberFieldElementFactory();
    nfactory.setName("Continent-Group-Footer Sum");
    nfactory.setAbsolutePosition(new Point2D.Float(260, 0));
    nfactory.setMinimumSize(new FloatDimension(76, 12));
    nfactory.setHorizontalAlignment(ElementAlignment.LEFT);
    nfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
    nfactory.setNullString("<null>");
    nfactory.setFieldname("sum");
    nfactory.setFormatString("#,##0");
    footer.addElement(nfactory.createElement());
    continentGroup.setFooter(footer);
    return continentGroup;
  }
View Full Code Here

        return header;
      }

      if (insert instanceof GroupFooter)
      {
        final GroupFooter footer = (GroupFooter) insert.derive();
        g.setFooter(footer);
        return footer;
      }

      if (insert instanceof GroupBody)
View Full Code Here

    }

    if (data instanceof GroupFooter)
    {
      final RelationalGroup g = (RelationalGroup) parent;
      final GroupFooter oldFooter = g.getFooter();
      final GroupFooter newFooter = new GroupFooter();
      g.setFooter(newFooter);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
    }
    if (data instanceof ReportFooter)
    {
View Full Code Here

    header.addElement(tfactory.createElement());

    header.addElement(HorizontalLineElementFactory.createHorizontalLine(12, null, new BasicStroke(0.5f)));
    continentGroup.setHeader(header);

    final GroupFooter footer = new GroupFooter();
    footer.setName("Continent-Group-Footer");
    footer.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(20));
    header.getStyle().setStyleProperty(TextStyleKeys.FONT, "Monospaced");
    header.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
    header.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.TRUE);

    factory = new LabelElementFactory();
    factory.setName("Continent-Group-Footer Label");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(100, 12));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setText("Population:");
    footer.addElement(factory.createElement());

    final NumberFieldElementFactory nfactory = new NumberFieldElementFactory();
    nfactory.setName("Continent-Group-Footer Sum");
    nfactory.setAbsolutePosition(new Point2D.Float(260, 0));
    nfactory.setMinimumSize(new FloatDimension(76, 12));
    nfactory.setHorizontalAlignment(ElementAlignment.LEFT);
    nfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
    nfactory.setNullString("<null>");
    nfactory.setFieldname("sum");
    nfactory.setFormatString("#,##0");
    footer.addElement(nfactory.createElement());
    continentGroup.setFooter(footer);
    return continentGroup;
  }
View Full Code Here

    super("group-footer", false);
  }

  public ReportElement create()
  {
    return new GroupFooter();
  }
View Full Code Here

TOP

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

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.