Examples of SubReport


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

    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

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

    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

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

    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

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

  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

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

    final Element veElement = (Element) data;
    final Section parent = veElement.getParentSection();
    if (data instanceof SubReport && parent instanceof AbstractRootLevelBand)
    {
      final AbstractRootLevelBand re = (AbstractRootLevelBand) parent;
      final SubReport report = (SubReport) data;
      final int index = ModelUtility.findSubreportIndexOf(re, report);
      if (index != -1)
      {
        re.removeSubreport(report);
      }
View Full Code Here

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

    }
    final RootLevelBand rlb = (RootLevelBand) parent;
    final SubReport[] reports = rlb.getSubReports();
    for (int i = 0; i < reports.length; i++)
    {
      final SubReport report = reports[i];
      if (r == report)
      {
        return true;
      }
    }
View Full Code Here

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

    final AbstractReportDefinition definition = activeContext.getReportDefinition();
    if (definition instanceof SubReport == false)
    {
      throw new IllegalStateException();
    }
    final SubReport subReport = (SubReport) definition;

    final Component parent = context.getView().getParent();
    final Window window = LibSwingUtil.getWindowAncestor(parent);
    final SubReportParameterDialog parameterDialog;
    if (window instanceof JDialog)
    {
      parameterDialog = new SubReportParameterDialog((JDialog) window);
    }
    else if (window instanceof JFrame)
    {
      parameterDialog = new SubReportParameterDialog((JFrame) window);
    }
    else
    {
      parameterDialog = new SubReportParameterDialog();
    }

    final SubReportParameterDialog.EditResult editResult =
        parameterDialog.performEdit(context, subReport.getInputMappings(), subReport.getExportMappings());
    if (editResult == null)
    {
      return;
    }

    final ParameterMapping[] oldImportMapping = subReport.getInputMappings();
    final ParameterMapping[] oldExportMapping = subReport.getExportMappings();
    activeContext.getUndo().addChange(ActionMessages.getString("EditParametersAction.SubReport.Text"),
        new EditSubreportParametersUndoEntry
            (oldImportMapping, oldExportMapping, editResult.getImportParameters(), editResult.getExportParameters()));
    subReport.setExportMappings(editResult.getExportParameters());
    subReport.setInputMappings(editResult.getImportParameters());
  }
View Full Code Here

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

      this.newExportParameters = newExportParameters;
    }

    public void undo(final ReportDocumentContext renderContext)
    {
      final SubReport reportDefinition = (SubReport) renderContext.getReportDefinition();
      reportDefinition.setInputMappings(oldImportParameters);
      reportDefinition.setExportMappings(oldExportParameters);
    }
View Full Code Here

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

      reportDefinition.setExportMappings(oldExportParameters);
    }

    public void redo(final ReportDocumentContext renderContext)
    {
      final SubReport reportDefinition = (SubReport) renderContext.getReportDefinition();
      reportDefinition.setInputMappings(newImportParameters);
      reportDefinition.setExportMappings(newExportParameters);
    }
View Full Code Here

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

    {
      final RootLevelBand rlb = (RootLevelBand) section;
      final SubReport[] subReports = rlb.getSubReports();
      for (int i = 0; i < subReports.length; i++)
      {
        final SubReport subReport = subReports[i];
        rootElementIds.add(subReport.getObjectID());
      }
    }

    renderableParents = new HashSet<InstanceID>();
    Section parent = section.getParentSection();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.