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

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


    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final ReportElement crosstab = report.getChildElementByType(CrosstabGroupType.INSTANCE);
    crosstab.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Crosstab.DETAIL_MODE, CrosstabDetailMode.first);

    // Test whether the final page has out-of-bounds boxes. The FillPhysicalPages step should have removed them
    final PrintReportProcessor rp = new PrintReportProcessor(report);
    for (int page = 0; page < rp.getNumberOfPages(); page += 1)
    {
View Full Code Here


    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final ReportElement crosstabCell = report.getChildElementByType(CrosstabCellType.INSTANCE);
//    crosstabCell.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.CROSSTAB_DETAIL_MODE, CrosstabDetailMode.first);

    // Test whether the final page has out-of-bounds boxes. The FillPhysicalPages step should have removed them
    final PrintReportProcessor rp = new PrintReportProcessor(report);
    DebugLog.log("Pages: " + rp.getNumberOfPages());
View Full Code Here

    }

    final ReportElement[] childs = event.getReport().getChildElementsByType(ItemBandType.INSTANCE);
    for (int i = 0; i < childs.length; i++)
    {
      final ReportElement child = childs[i];
      final ReportElement[] elements = child.getChildElementsByName(getElement());
      for (int x = 0; x < elements.length; x++)
      {
        elements[x].getStyle().setStyleProperty(ElementStyleKeys.VISIBLE, trigger);
      }
    }
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

   *
   * @param attrs the attributes.
   * @throws SAXException if there is a parsing error.
   */
  protected void startParsing(final Attributes attrs) throws SAXException {
    final ReportElement element = getElement();
    if (element == null) {
      throw new IllegalStateException("Failed at " + getClass());
    }

    final int length = attrs.getLength();
View Full Code Here

    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final ReportElement crosstabCell = report.getChildElementByType(CrosstabCellType.INSTANCE);
//    crosstabCell.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.CROSSTAB_DETAIL_MODE, CrosstabDetailMode.first);

//    ModelPrinter.print(DebugReportRunner.layoutPage(report, 0));
    for (int i = 0; i < 10; i += 1)
    {
View Full Code Here

    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final ReportElement crosstabCell = report.getChildElementByType(CrosstabCellType.INSTANCE);
//    report.setAttribute(AttributeNames.Internal.NAMESPACE, AttributeNames.Internal.QUERY_LIMIT, 100);
//    crosstabCell.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.CROSSTAB_DETAIL_MODE, CrosstabDetailMode.first);

//    ModelPrinter.print(DebugReportRunner.layoutPage(report, 0));
    DebugReportRunner.showDialog(report);
View Full Code Here

                              final Section section) throws BundleWriterException
  {
    final int count = section.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = section.getElement(i);
      if (element instanceof Section)
      {
        processSection(documentBundle, report, (Section) element);
      }

      if (element instanceof RootLevelBand)
      {
        final RootLevelBand rl = (RootLevelBand) element;
        final SubReport[] reports = rl.getSubReports();
        for (int j = 0; j < reports.length; j++)
        {
          final SubReport subReport = reports[j];
          processSection(documentBundle, report, subReport);
        }
      }

      // Process the attributes if they are a resource key
      final ElementMetaData metaData = element.getMetaData();
      final AttributeMetaData[] attributeDescriptions = metaData.getAttributeDescriptions();
      for (int j = 0; j < attributeDescriptions.length; j++)
      {
        final AttributeMetaData attributeDescription = attributeDescriptions[j];
        if ("Resource".equals(attributeDescription.getValueRole()) == false)
        {
          continue;
        }

        final Object attribute = element.getAttribute(attributeDescription.getNameSpace(), attributeDescription.getName());
        if (attribute instanceof ResourceKey == false)
        {
          continue;
        }

        final ResourceKey resourceKey = (ResourceKey) attribute;
        final ResourceKey replacementKey = processResourceKeyAttribute(documentBundle, report, resourceKey);
        if (replacementKey != null)
        {
          element.setAttribute(attributeDescription.getNameSpace(), attributeDescription.getName(), replacementKey);
        }
      }
    }
  }
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 LinkedHashMap<InstanceID, InlineSubreportMarker>();
        }
        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

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.