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

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


    {
      final RootLevelBand rootLevelBand = (RootLevelBand) band;
      final SubReport[] reports = rootLevelBand.getSubReports();
      for (int i = 0; i < reports.length; i++)
      {
        final SubReport report = reports[i];
        if (report.getObjectID() == id)
        {
          return report;
        }
      }
    }
View Full Code Here


    {
      final RootLevelBand rlb = (RootLevelBand) b;
      final SubReport[] reports = rlb.getSubReports();
      for (int i = 0; i < reports.length; i++)
      {
        final SubReport subReport = reports[i];
        if (evaluateElement(subReport))
        {
          hasAttrExpressions = true;
        }
      }
View Full Code Here

    {
      final RootLevelBand rlb = (RootLevelBand) b;
      final SubReport[] reports = rlb.getSubReports();
      for (int i = 0; i < reports.length; i++)
      {
        final SubReport subReport = reports[i];
        if (evaluateElement(subReport))
        {
          hasAttrExpressions = true;
        }
      }
View Full Code Here

    {
      final RootLevelBand rlb = (RootLevelBand) b;
      final SubReport[] reports = rlb.getSubReports();
      for (int i = 0; i < reports.length; i++)
      {
        final SubReport subReport = reports[i];
        if (evaluateElement(subReport))
        {
          hasAttrExpressions = true;
        }
      }
View Full Code Here

    if (key == null)
    {
      throw new NullPointerException();
    }

    final SubReport subReport = (SubReport) storage.get(key);
    if (subReport == null)
    {
      return null;
    }

    try
    {
      // derive would regenerate instance-IDs, which is not advisable.
      return (SubReport) subReport.clone();
    }
    catch (CloneNotSupportedException e)
    {
      throw new ReportProcessingException("Failed to restore subreport", e);
    }
View Full Code Here

  }

  public void testRendering() throws Exception
  {
    MasterReport masterReport = new MasterReport();
    SubReport element = new SubReport();
    masterReport.getReportHeader().addSubReport(element);

    ReportLayouter l = new ReportLayouter(new ReportRenderContext(masterReport));
    LogicalPageBox layout = l.layout();
    ModelPrinter.INSTANCE.print(layout);

    MatchFactory.findElementsByAttribute
        (layout, AttributeNames.Core.NAMESPACE, AttributeNames.Core.ELEMENT_TYPE, element.getElementType());
  }
View Full Code Here

    final MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();

    final GlobalAuthenticationStore globalAuthenticationStore = new GlobalAuthenticationStore();
    final ReportRenderContext masterContext =
        new ReportRenderContext(report, report, null, globalAuthenticationStore);
    final SubReport subReport = report.getItemBand().getSubReport(0);
    final ReportRenderContext subContext =
        new ReportRenderContext(report, subReport, masterContext, globalAuthenticationStore);
    final TestRootBandRenderer r = new TestRootBandRenderer(subReport.getPageFooter(), subContext);

    final ValidateTextGraphics graphics2D = new ValidateTextGraphics(468, 108);
    graphics2D.expect("Banded", "SubReport", "Footer");
    assertTrue(graphics2D.hitClip(10, 10, 1, 1));
    r.draw(graphics2D);
View Full Code Here

    final MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();

    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 ValidateTextGraphics graphics2D = new ValidateTextGraphics(468, 108);
    graphics2D.expect("Any Text Printed Is An Error!");
    assertTrue(graphics2D.hitClip(10, 10, 1, 1));
    r.draw(graphics2D);
View Full Code Here

    final MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();

    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 SubReport subReport2 = subReport.getReportHeader().getSubReport(0);
    final ReportRenderContext subSubContext =
        new ReportRenderContext(report, subReport2, subContext, globalAuthenticationStore);

    final TestRootBandRenderer r = new TestRootBandRenderer(subReport.getPageFooter(), subSubContext);
View Full Code Here

  public void testSelectionOnSubReport() {

    WorkspaceSettings.getInstance().setExperimentalFeaturesVisible(true);

    final MasterReport report = new MasterReport();
    final SubReport element = new SubReport();
    report.getReportHeader().addElement(element);

    final TestReportDesignerContext rdc = new TestReportDesignerContext();
    rdc.addMasterReport(report);
    rdc.addSubReport((ReportDocumentContext) rdc.getDocumentContext(0), element);
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.