Examples of MasterReport


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

    final URL url = getClass().getResource("prd-2933.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final EventMonitorFunction eventMonitorFunction = new EventMonitorFunction("Name");
    eventMonitorFunction.setDeepTraversing(true);
    report.addExpression(eventMonitorFunction);

    final PrintReportProcessor prc = new PrintReportProcessor(report);
    final PageDrawable pageDrawable = prc.getPageDrawable(2);
    assertNotNull(pageDrawable);
    final RenderNode[] renderNodes = pageDrawable.getNodesAt(1, 1, null, null);

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

   * @throws org.pentaho.reporting.engine.classic.demo.util.ReportDefinitionException
   *          if an error occured preventing the report definition.
   */
  public MasterReport createReport() throws ReportDefinitionException
  {
    final MasterReport report = parseReport();
    report.setDataFactory(new TableDataFactory("default", data));
    return report;
  }

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

  {
    final CountryReportXMLDemoHandler demoHandler =
            new CountryReportXMLDemoHandler();
    try
    {
      final MasterReport report = demoHandler.createReport();
      final RelationalGroup g = report.getGroupByName("default");
      if (g != null)
      {
        report.removeGroup(g);
      }
      report.addExpression(new TotalGroupCountVerifyFunction());

      final TotalGroupCountFunction f = new TotalGroupCountFunction();
      f.setName("continent-total-gc");
      f.setGroup("Continent Group");
      f.setDependencyLevel(1);
      report.addExpression(f);

      final TotalGroupCountFunction f2 = new TotalGroupCountFunction();
      f2.setName("total-gc");
      f2.setDependencyLevel(1);
      report.addExpression(f2);

      assertTrue(FunctionalityTestLib.execGraphics2D(report));
    }
    catch (Exception e)
    {

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

  }

  public  void testRoundRect() throws Exception
  {
    ClassicEngineBoot.getInstance().start();
    MasterReport report = parseReport(getReportDefinitionSource());
    assertTrue(FunctionalityTestLib.execGraphics2D(report));
  }

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

  {
    final CountryReportXMLDemoHandler demoHandler =
            new CountryReportXMLDemoHandler();
    try
    {
      final MasterReport report = demoHandler.createReport();
      final RelationalGroup g = report.getGroupByName("default");
      if (g != null)
      {
        report.removeGroup(g);
      }
      report.addExpression(new TotalGroupCountVerifyFunction());

      final TotalGroupCountFunction f = new TotalGroupCountFunction();
      f.setName("continent-total-gc");
      f.setGroup("Continent Group");
      f.setDependencyLevel(1);
      report.addExpression(f);

      final TotalGroupCountFunction f2 = new TotalGroupCountFunction();
      f2.setName("total-gc");
      f2.setDependencyLevel(1);
      report.addExpression(f2);

      assertTrue(FunctionalityTestLib.execGraphics2D(report));
      assertTrue(FunctionalityTestLib.execGraphics2D(report));
      assertTrue(FunctionalityTestLib.execGraphics2D(report));
      assertTrue(FunctionalityTestLib.execGraphics2D(report));

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

  private void executeFromOne(final CountryReportXMLDemoHandler demoHandler)
  {
    try
    {
      final MasterReport report = demoHandler.createReport();
      final RelationalGroup g = report.getGroupByName("default");
      if (g != null)
      {
        report.removeGroup(g);
      }
      report.addExpression(new TotalGroupCountVerifyFunction());

      final TotalGroupCountFunction f = new TotalGroupCountFunction();
      f.setName("continent-total-gc");
      f.setGroup("Continent Group");
      f.setDependencyLevel(1);
      report.addExpression(f);

      final TotalGroupCountFunction f2 = new TotalGroupCountFunction();
      f2.setName("total-gc");
      f2.setDependencyLevel(1);
      report.addExpression(f2);


      assertTrue(FunctionalityTestLib.execGraphics2D(report));
    }
    catch (Exception e)

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

    final ReportParameterValues parameterValues = new ReportParameterValues();
    parameterValues.put("parameter", pvalue);
    sdf.queryData("default", parameterValues);
    sdf.close();

    final MasterReport report = new MasterReport();
    report.setDataFactory(sdf);

    final DefaultListParameter listParameter =
        new DefaultListParameter("params", "CUSTOMERNUMBER", "CUSTOMERNUMBER", "parameter", true, true, Integer[].class);
    listParameter.setMandatory(mandatory);

    final ModifiableReportParameterDefinition definition =
        (ModifiableReportParameterDefinition) report.getParameterDefinition();
    definition.addParameterDefinition(listParameter);
    report.getParameterValues().put("parameter", pvalue);


    return (execGraphics2D(report));
  }

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

      final XmlDemoHandler handler = handlers[i];
      final URL url = handler.getReportDefinitionSource();
      assertNotNull("Failed to locate " + url, url);
      try
      {
        final MasterReport report = ReportGenerator.getInstance().parseReport(url);
        assertNotNull(report);
        report.clone();

        final ByteArrayOutputStream bo = new ByteArrayOutputStream();
        final ObjectOutputStream out = new ObjectOutputStream(bo);
        out.writeObject(report);

        final ObjectInputStream oin = new ObjectInputStream
          (new ByteArrayInputStream(bo.toByteArray()));
        final MasterReport e2 = (MasterReport) oin.readObject();
        assertNotNull(e2); // cannot assert equals, as this is not implemented.

      }
      catch (Exception e)
      {

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

            "Capacity", "Cost", "Group", "Location", "Type", "Container", "Date Acquired" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
    };

    ClassicEngineBoot.getInstance().start();
    final TableModel dataModel = new DefaultTableModel(data, names);
    MasterReport report = parseReport(getReportDefinitionSource());
    report.setDataFactory(new TableDataFactory
        ("default", dataModel)); //$NON-NLS-1$
    PdfReportUtil.createPDF(report, "PagebreakItemband.pdf"); //$NON-NLS-1$
    assertTrue(true);
  }

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

  private String computeNameFromReport(final ResourceManager resourceManager, final ResourceKey key)
  {
    try
    {
      final Resource res = resourceManager.create(key, null, new Class[]{MasterReport.class});
      final MasterReport rawResource = (MasterReport) res.getResource();
      final Object possibleTitle = rawResource.getName();
      if (possibleTitle != null)
      {
        return possibleTitle.toString();
      }
      return null;
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.