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

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


    };

    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

    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

      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

    };

    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

    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

  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

    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

      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

  public void test268() throws ReportProcessingException, IOException, ReportDefinitionException
  {
    final MasterReport report = parseReport(getReportDefinitionSource());

    final TableDataFactory tdf = new TableDataFactory();
    tdf.addTable("default", new DefaultTableModel(10, 10));
    tdf.addTable("SubQ1", new DefaultTableModel(11, 10));
    report.setDataFactory(tdf);
   
    final PageFormat pageFormat = report.getPageDefinition().getPageFormat(0);
//    pageFormat.setOrientation(PageFormat.LANDSCAPE);
    report.setPageDefinition(new SimplePageDefinition(pageFormat));
View Full Code Here

TOP

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

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.