Package org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql

Examples of org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SQLReportDataFactory.queryData()


    sdf.setQuery("params", "SELECT DISTINCT CUSTOMERNUMBER FROM CUSTOMERS");
    sdf.open();

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

    final MasterReport report = new MasterReport();
    report.setDataFactory(sdf);
View Full Code Here


            + "TypedTableModel model = new TypedTableModel([\"column1\"] as String[], [String.class] as Class[]);"
            + "model.addRow(\"row1\");" + "return model;" + "}" );

    try {
      sqlReportDataFactory.initialize( new DesignTimeDataFactoryContext() );
      TableModel data = sqlReportDataFactory.queryData( "default", new StaticDataRow() );
      Assert.assertEquals( 1, data.getColumnCount() );
      Assert.assertEquals( 1, data.getRowCount() );
      Assert.assertEquals( "row1", data.getValueAt( 0, 0 ) );
    } finally {
      sqlReportDataFactory.close();
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.