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

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


    {
      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


  }

  public SubReport findSubReport(final InstanceID reportID)
  {

    final ReportElement element =
        FunctionUtilities.findElementByInstanceId((ReportDefinition) this, reportID);
    if (element instanceof SubReport)
    {
      return (SubReport) element;
    }
View Full Code Here

    }

    final int count = rootLevelBand.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = rootLevelBand.getElement(i);
      if (element instanceof SubReport)
      {
        if (list == null)
        {
          list = new LinkedMap();
        }
        list.put(element.getObjectID(),
            new InlineSubreportMarker((SubReport) element, DUMMY_SUBREPORT_MARKER, SubReportProcessType.INLINE));
      }
      else if (element instanceof Section)
      {
        list = collectSubReportMarkers((Section) element, list);
View Full Code Here

  private boolean isStructureRunNeeded(final Section section)
  {
    final int count = section.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = section.getElement(i);
      final Object type = element.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.ELEMENT_TYPE);
      if (type instanceof ExternalElementType)
      {
        return true;
      }
View Full Code Here

      return band;
    }

    for (int i = 0; i < band.getElementCount(); i++)
    {
      final ReportElement e = band.getElement(i);
      if (id.equals(e.getId()))
      {
        return e;
      }
      if (e instanceof Section)
      {
        final ReportElement retval = findElementById((Section) e, id);
        if (retval != null)
        {
          return retval;
        }
      }
View Full Code Here

      return band;
    }

    for (int i = 0; i < band.getElementCount(); i++)
    {
      final ReportElement e = band.getElement(i);
      if (id == e.getObjectID())
      {
        return e;
      }
      if (e instanceof Section)
      {
        final ReportElement retval = findElementByInstanceId((Section) e, id);
        if (retval != null)
        {
          return retval;
        }
      }
View Full Code Here

      return band;
    }

    for (int i = 0; i < band.getElementCount(); i++)
    {
      final ReportElement e = band.getElement(i);
      if (attributeValue.equals(e.getAttribute(attributeNamespace, attributeName)))
      {
        return e;
      }
      if (e instanceof Section)
      {
        final ReportElement retval = findElementByAttribute
            ((Section) e, attributeNamespace, attributeName, attributeValue);
        if (retval != null)
        {
          return retval;
        }
View Full Code Here

    }

    final int elementCount = b.getElementCount();
    for (int i = 0; i < elementCount; i++)
    {
      final ReportElement element = b.getElement(i);
      if (element instanceof Band)
      {
        processRootBand((Band) element);
      }
      else if (element instanceof Element)
      {
        final Element e = (Element) element;
        final DataSource source = e.getElementType();
        if (source instanceof RawDataSource)
        {
          final ElementStyleSheet style = element.getStyle();
          final String oldFormat = (String)
              style.getStyleProperty(ElementStyleKeys.EXCEL_DATA_FORMAT_STRING);
          if (oldFormat != null && oldFormat.length() > 0)
          {
            final Object attribute = element.getAttribute
                (AttributeNames.Internal.NAMESPACE, AttributeNames.Internal.EXCEL_CELL_FORMAT_AUTOCOMPUTE);
            if (Boolean.TRUE.equals(attribute) == false)
            {
              continue;
            }
          }
          final RawDataSource rds = (RawDataSource) source;
          formatSpecification = rds.getFormatString(getRuntime(), e, formatSpecification);
          if (formatSpecification.getType() == FormatSpecification.TYPE_DATE_FORMAT ||
              formatSpecification.getType() == FormatSpecification.TYPE_DECIMAL_FORMAT)
          {
            style.setStyleProperty
                (ElementStyleKeys.EXCEL_DATA_FORMAT_STRING, formatSpecification.getFormatString());
            element.setAttribute
                (AttributeNames.Internal.NAMESPACE, AttributeNames.Internal.EXCEL_CELL_FORMAT_AUTOCOMPUTE,
                    Boolean.TRUE);
          }
        }
      }
View Full Code Here

                              final Section section)
  {
    final int count = section.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = section.getElement(i);
      inspectElement(designerContext, reportRenderContext, resultHandler, columnNames, element);
      if (element instanceof SubReport && reportRenderContext.getReportDefinition() != element)
      {
        continue;
      }
View Full Code Here

      {
        return o;
      }
      if (o instanceof ReportElement)
      {
        final ReportElement element = (ReportElement) o;
        final Section parentSection = element.getParentSection();
        if (parentSection instanceof Band)
        {
          return parentSection;
        }
      }
View Full Code Here

TOP

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

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.