Examples of TableDataFactory


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

        final MasterReport report = handler.createReport();
        final DataFactory model = report.getDataFactory();

        // we don't test whether our demo models are serializable :)
        report.setDataFactory(new TableDataFactory
            ("default", new DefaultTableModel()));
        // clear all report properties, which may cause trouble ...
        final ReportProperties p = report.getProperties();
        final Iterator keys = p.keys();
        while (keys.hasNext())
View Full Code Here

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

    setUp();
    final MasterReport report = getReport();
    final DefaultTableModel model = new DefaultTableModel(2, 1);
    model.setValueAt("0-0", 0, 0);
    model.setValueAt("0-1", 1, 0);
    report.setDataFactory(new TableDataFactory
        ("default", model));

    logger.debug("   GRAPHICS2D ..");
    assertTrue(FunctionalityTestLib.execGraphics2D(report));
    logger.debug("   PDF ..");
View Full Code Here

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

    };

    final DefaultTableModel tableModel = new DefaultTableModel(COLNAMES, 8000);

    final MasterReport report = new MasterReport();
    report.setDataFactory(new TableDataFactory
        ("default", tableModel));

    final RelationalGroup group = new RelationalGroup();
    group.setName("Run");
    group.addField("run");
View Full Code Here

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

    report.getReportConfiguration().setConfigProperty("org.pentaho.reporting.engine.classic.core.layout.fontrenderer.UseMaxCharBounds", Boolean.TRUE.toString());

    DefaultTableModel tm1 = new DefaultTableModel(new Object[][]{{"1"}, {"2"}, {"3"}, {"4"}, {"5"}, {"6"}, {"7"}, {"8"}, {"9"}}, new Object[]{"column"});

    TableDataFactory dataFactory = new TableDataFactory("default", tm1);
    report.setDataFactory(dataFactory);

    ClassicEngineBoot.getInstance().start();
    assertTrue(FunctionalityTestLib.execGraphics2D(report));
  }
View Full Code Here

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

      throw new NullPointerException();
    }

    try
    {
      final TableDataFactory tableDataFactory = (TableDataFactory) dataFactory;

      final AttributeList rootAttrs = new AttributeList();
      if (xmlWriter.isNamespaceDefined(InlineDataFactoryModule.NAMESPACE) == false)
      {
        rootAttrs.addNamespaceDeclaration("data", InlineDataFactoryModule.NAMESPACE);
      }
      xmlWriter.writeTag(InlineDataFactoryModule.NAMESPACE, "inline-datasource", rootAttrs, XmlWriterSupport.OPEN);

      final String[] tables = tableDataFactory.getQueryNames();
      for (int i = 0; i < tables.length; i++)
      {
        final String tableName = tables[i];
        final TableModel tableModel = tableDataFactory.queryData(tableName, null);

        xmlWriter.writeTag(InlineDataFactoryModule.NAMESPACE, "inline-table", "name", tableName, XmlWriterSupport.OPEN);
        xmlWriter.writeTag(InlineDataFactoryModule.NAMESPACE, "definition", XmlWriterSupport.OPEN);

        final Class[] colTypes = new Class[tableModel.getColumnCount()];
View Full Code Here

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

    };

    final TableModel dataModel = new DefaultTableModel(data, names);
    MasterReport report = parseReport(getReportDefinitionSource());
    report.setDataFactory(new TableDataFactory
        ("default", dataModel)); //$NON-NLS-1$
    assertTrue(FunctionalityTestLib.execGraphics2D(report)); }
View Full Code Here

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

    csvTableModelProducer.close();

    final DefaultTableModel model = copyInto(tableModel);
    model.setValueAt(largeText, 3,2);

    report.setDataFactory(new TableDataFactory(report.getQuery(), model));
    TestSystem.showPreview(report);
  }
View Full Code Here

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

  public  void testPre112() throws ReportProcessingException, IOException, ReportDefinitionException
  {
    ClassicEngineBoot.getInstance().start();
    String outputFilename = getReportOutputPath() + "/report-282.html"; //$NON-NLS-1$
    final MasterReport report = parseReport(getReportDefinitionSource());
    report.setDataFactory(new TableDataFactory(report.getQuery(), new DefaultTableModel(10, 10)));
    HtmlReportUtil.createStreamHTML(report, outputFilename);
    assertTrue(true);
  }
View Full Code Here

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

    columnTypes[2] = Integer[].class;
    columnTypes[3] = String.class;
    final TypedTableModel sampleModel = new TypedTableModel(columnNames, columnTypes);

    final CompoundDataFactory compoundDataFactory = new CompoundDataFactory();
    compoundDataFactory.add(new TableDataFactory("design-time-data", sampleModel));
    setQuery("design-time-data");
    setDataFactory(compoundDataFactory);
  }
View Full Code Here

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

      columnTypes[i + 4] = Object.class;
    }
    final TypedTableModel sampleModel = new TypedTableModel(columnNames, columnTypes);

    final CompoundDataFactory compoundDataFactory = new CompoundDataFactory();
    compoundDataFactory.add(new TableDataFactory("design-time-data", sampleModel));
    setQuery("design-time-data");
    setDataFactory(compoundDataFactory);
  }
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.