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

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


                                  final String fieldName,
                                  final ReportDocumentContext context) throws InstantiationException
  {
    // Create a subreport element
    final ElementType type = elementMetaData.create();
    final SubReport visualElement = new SubReport();
    visualElement.setAutoSort(Boolean.TRUE);
    visualElement.getRelationalGroup(0).getHeader().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getRelationalGroup(0).getFooter().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getDetailsFooter().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getDetailsHeader().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getNoDataBand().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getWatermark().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);

    type.configureDesignTimeDefaults(visualElement, Locale.getDefault());

    final ElementStyleSheet styleSheet = visualElement.getStyle();
    styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
    styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);
    return visualElement;
  }
View Full Code Here


    if (sectionReportElement instanceof RootLevelBand)
    {
      final RootLevelBand rlb = (RootLevelBand) sectionReportElement;
      for (int i = 0; i < rlb.getSubReportCount(); i += 1)
      {
        final SubReport reportElement = rlb.getSubReport(i);
        final InstanceID id = reportElement.getObjectID();
        elementsById.put(id, reportElement);
        collectDesignTimeElements(reportElement);
      }
    }
  }
View Full Code Here

    {
      final AbstractRootLevelBand re = (AbstractRootLevelBand) reportElement;
      final int count = re.getSubReportCount() - 1;
      for (int i = 0; i < count; i++)
      {
        final SubReport sr = re.getSubReport(i);
        if (sr == element)
        {
          re.removeSubreport(sr);
          re.addSubReport(i + 1, sr);
View Full Code Here

          designerContext.setActiveDocument(rrc);
          return;
        }
      }

      final SubReport report = (SubReport) element;
      try
      {
        designerContext.addSubReport(activeReportContext, report);
      }
      catch (ReportDataFactoryException e1)
View Full Code Here

        context.setActiveDocument(rrc);
        return null;
      }
    }

    final SubReport report = (SubReport)value;

    // If this is a crosstab sub-report, increase zoom factor.
    if (value instanceof CrosstabElement)
    {
      report.getReportDefinition().setAttribute(ReportDesignerBoot.DESIGNER_NAMESPACE, ReportDesignerBoot.ZOOM, 1.5f);
    }

    try
    {
      context.addSubReport(rootBandRenderComponent.getRenderContext(), report);
View Full Code Here

    {
      final AbstractRootLevelBand re = (AbstractRootLevelBand) reportElement;
      final int count = re.getSubReportCount() - 1;
      for (int i = 0; i < count; i++)
      {
        final SubReport sr = re.getSubReport(i);
        if (sr == element)
        {
          re.removeSubreport(sr);
          re.addSubReport(sr);
View Full Code Here

      {
        final RootLevelBand rl = (RootLevelBand) section;
        final int count = rl.getSubReportCount();
        for (int i = 0; i < count; i++)
        {
          final SubReport report = rl.getSubReport(i);
          elementsById.put(report.getObjectID(), report);
        }
      }

      startProcessing(logicalPageBox);
    }
View Full Code Here

    ClassicEngineBoot.getInstance().start();
  }

  private MasterReport createReport()
  {
    SubReport sr = new SubReport();
    sr.getPageHeader().addElement(create("SR-Page-Header"));
    sr.getPageFooter().addElement(create("SR-Page-Footer"));
    sr.getReportHeader().addElement(create("SR-Report-Header"));

    MasterReport report = new MasterReport();
    report.getReportHeader().addElement(sr);
    report.getPageHeader().addElement(create("MR-Page-Header"));
    report.getPageFooter().addElement(create("MR-Page-Footer"));
View Full Code Here

    final MasterReport report = createReport();

    final GlobalAuthenticationStore globalAuthenticationStore = new GlobalAuthenticationStore();
    final ReportRenderContext masterContext =
        new ReportRenderContext(report, report, null, globalAuthenticationStore);
    final SubReport subReport = (SubReport) report.getReportHeader().getElement(0);
    final ReportRenderContext subContext =
        new ReportRenderContext(report, subReport, masterContext, globalAuthenticationStore);
    final TestRootBandRenderer r = new TestRootBandRenderer(subReport.getPageHeader(), subContext);
    final Rectangle2D bounds = r.getBounds();

    Assert.assertEquals(new Rectangle2D.Double(0, 20, 468, 72), bounds);

    final ValidateTextGraphics graphics2D = new ValidateTextGraphics(468, 108);
View Full Code Here

    final MasterReport report = createReport();

    final GlobalAuthenticationStore globalAuthenticationStore = new GlobalAuthenticationStore();
    final ReportRenderContext masterContext =
        new ReportRenderContext(report, report, null, globalAuthenticationStore);
    final SubReport subReport = (SubReport) report.getReportHeader().getElement(0);
    final ReportRenderContext subContext =
        new ReportRenderContext(report, subReport, masterContext, globalAuthenticationStore);
    final TestRootBandRenderer r = new TestRootBandRenderer(subReport.getPageFooter(), subContext);
    final Rectangle2D bounds = r.getBounds();

    Assert.assertEquals(new Rectangle2D.Double(0, 20, 468, 72), bounds);

    final ValidateTextGraphics graphics2D = new ValidateTextGraphics(468, 108);
View Full Code Here

TOP

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

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.