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

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


        activeContext.getUndo().addChange(ActionMessages.getString("InsertCrosstabOtherGroupAction.UndoName"),
            new InsertGroupBodyOnGroupUndoEntry(selectedGroup.getObjectID(), oldGroupBody, newGroupBody));
      }
      if (selectedElement instanceof CrosstabGroup)
      {
        final CrosstabGroup selectedGroup = (CrosstabGroup) selectedElement;
        final GroupBody oldGroupBody = selectedGroup.getBody();
        final CrosstabOtherGroupBody newGroupBody = new CrosstabOtherGroupBody(newGroup);
        selectedGroup.setBody(newGroupBody);
        newGroup.setBody(oldGroupBody);

        activeContext.getUndo().addChange(ActionMessages.getString("InsertCrosstabOtherGroupAction.UndoName"),
            new InsertGroupBodyOnGroupUndoEntry(selectedGroup.getObjectID(), oldGroupBody, newGroupBody));
      }
    }
    catch (Exception ex)
    {
      UncaughtExceptionsModel.getInstance().addException(ex);
View Full Code Here


    {
      final CrosstabElement crosstabElement = (CrosstabElement)reportDefinition;
      final Group group = crosstabElement.getRootGroup();
      if (group instanceof CrosstabGroup)
      {
        final CrosstabGroup crosstabGroup = (CrosstabGroup)group;
        final GroupBody crosstabGroupBody = crosstabGroup.getBody();

        // Start with the other group and work our way deeper recursively.
        // Note: Other Group is optional.
        if (crosstabGroupBody instanceof CrosstabOtherGroupBody)
        {
          final CrosstabOtherGroup crosstabOtherGroup = ((CrosstabOtherGroupBody)crosstabGroupBody).getGroup();
          buildCrosstabOtherRowGroupBands(crosstabOtherGroup);
        }
        else if (crosstabGroupBody instanceof CrosstabRowGroupBody)
        {
          final CrosstabRowGroupBody crosstabRowGroupBody = (CrosstabRowGroupBody)crosstabGroup.getBody();
          buildCrosstabRowGroupBands(crosstabRowGroupBody);
        }

        // Create an array of all elements.
        allElementsList.addAll(otherGroupBodyList);
View Full Code Here

      {
        dialog = new CreateCrosstabDialog();
      }


      final CrosstabGroup newGroup = dialog.createCrosstab(context, null);
      if (newGroup == null)
      {
        return;
      }
View Full Code Here

  {
    // Create a crosstab element
    final ElementType type = elementMetaData.create();
    final CrosstabElement visualElement = new CrosstabElement();
    visualElement.setElementType(type);
    visualElement.setRootGroup(new CrosstabGroup());
    visualElement.setAutoSort(Boolean.TRUE);

    // Hide all bands except for Details
    visualElement.getPageHeader().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getReportHeader().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
View Full Code Here

      if (activeContext == null)
      {
        return;
      }

      final CrosstabGroup selectedCrosstab = findSelectedCrosstab(activeContext);
      if (selectedCrosstab == null)
      {
        return;
      }

      final CrosstabGroup newGroup = performEdit(selectedCrosstab);
      if (newGroup == null)
      {
        return;
      }
View Full Code Here

  }

  protected CrosstabGroup performEdit(final CrosstabGroup selectedCrosstab)
  {
    final CreateCrosstabDialog dialog = createDialog();
    final CrosstabGroup newGroup = dialog.createCrosstab(getReportDesignerContext(), selectedCrosstab);
    if (newGroup == null)
    {
      return null;
    }
    return newGroup;
View Full Code Here

    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "false");

    final Group rootGroup = report.getRootGroup();
    assertTrue(rootGroup instanceof CrosstabGroup);

    final CrosstabGroup ct = (CrosstabGroup) rootGroup;
    ct.setPrintColumnTitleHeader(true);
    ct.setPrintDetailsHeader(false);

    final MemoryByteArrayOutputStream outputStream = new MemoryByteArrayOutputStream();
    HtmlReportUtil.createStreamHTML(report, outputStream);

    final String htmlText = new String(outputStream.toByteArray(), "UTF-8");
View Full Code Here

    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");

    final Group rootGroup = report.getRootGroup();
    assertTrue(rootGroup instanceof CrosstabGroup);

    final CrosstabGroup ct = (CrosstabGroup) rootGroup;
    ct.setPrintColumnTitleHeader(true);
    ct.setPrintDetailsHeader(false);

    final MemoryByteArrayOutputStream outputStream = new MemoryByteArrayOutputStream();
    HtmlReportUtil.createStreamHTML(report, outputStream);

    final String htmlText = new String(outputStream.toByteArray(), "UTF-8");
View Full Code Here

   */
  protected void doneParsing() throws SAXException
  {
    super.doneParsing();

    final CrosstabGroup group = getElement();
    if (headerReadHandler != null)
    {
      group.setHeader(headerReadHandler.getElement());
    }
    if (footerReadHandler != null)
    {
      group.setFooter(footerReadHandler.getElement());
    }
    if (noDataBandReadHandler != null)
    {
      group.setNoDataBand(noDataBandReadHandler.getElement());
    }
    if (rowSubGroupBodyReadHandler != null)
    {
      group.setBody(rowSubGroupBodyReadHandler.getElement());
    }
    else if (otherSubGroupBodyReadHandler != null)
    {
      group.setBody(otherSubGroupBodyReadHandler.getElement());
    }
  }
View Full Code Here

    super("crosstab", true);
  }

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

TOP

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

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.