Package org.eclipse.birt.report.model.api

Examples of org.eclipse.birt.report.model.api.PropertyHandle


    ComputedColumn cs3 = StructureFactory.createComputedColumn();
    cs3.setName("Amount");
    cs3.setExpression("row[\"Amount\"]");
    cs3.setDataType("integer");

    PropertyHandle computedSet = dataSetHandle.getPropertyHandle("computedColumns");
    computedSet.addItem(cs1);
    computedSet.addItem(cs2);
    computedSet.addItem(cs3);

    reportDesignHandle.getDataSets().add(dataSetHandle);

    TableHandle mytable = elementFactory.newTableItem(null, 3, 1, 1, 1);
    mytable.setWidth("100%");
    mytable.setProperty("dataSet", dataSet);

    computedSet = mytable.getColumnBindings();

    cs1.setExpression("dataSetRow[\"Month\"]");
    computedSet.addItem(cs1);

    cs2.setExpression("dataSetRow[\"Product\"]");
    computedSet.addItem(cs2);

    cs3.setExpression("dataSetRow[\"Amount\"]");
    computedSet.addItem(cs3);

    // Header
    RowHandle myheader = (RowHandle) mytable.getHeader().get(0);

    CellHandle tcell = (CellHandle) myheader.getCells().get(0);
View Full Code Here


          ComputedColumn computedColumn = StructureFactory
              .createComputedColumn();
          computedColumn.setName(columnName);
          computedColumn.setExpression("dataSetRow[\"" + columnName
              + "\"]");
          PropertyHandle computedSet = reportTable
              .getColumnBindings();
          reportTable.getColumnBindings().addItem(computedColumn);

          // add new data item and cell
          DataItemHandle data = reportDesign.getElementFactory()
View Full Code Here

      TableHandle table = designFactory.newTableItem("table", cols.size());
      table.setWidth("100%");
      table.setDataSet(designHandle.findDataSet("ds"));

      PropertyHandle computedSet = table.getColumnBindings();
      ComputedColumn cs1 = null;

      for( int i = 0 ; i < cols.size() ; i++ ) {
        cs1 = StructureFactory.createComputedColumn();
        cs1.setName((String) cols.get(i));
        cs1.setExpression("dataSetRow[\"" + (String) cols.get(i) + "\"]");
        computedSet.addItem(cs1);
      }

      // table header
      RowHandle tableheader = (RowHandle) table.getHeader().get(0);
View Full Code Here

    ColumnHandle ch = (ColumnHandle) table.getColumns().get(0);
    // ch.setProperty("Width", "3in");
    ch.getWidth().setStringValue("3in");

    PropertyHandle computedSet = table.getColumnBindings();
    cs1 = StructureFactory.createComputedColumn();
    cs2 = StructureFactory.createComputedColumn();
    cs3 = StructureFactory.createComputedColumn();
    cs4 = StructureFactory.createComputedColumn();
    cs5 = StructureFactory.createComputedColumn();
    cs6 = StructureFactory.createComputedColumn();

    cs1.setName("ORDERNUMBER");
    cs1.setExpression("dataSetRow[\"ORDERNUMBER\"]");
    cs1.setDataType("Integer");
    computedSet.addItem(cs1);

    cs2.setName("Product");
    cs2.setExpression("dataSetRow[\"PRODUCTCODE\"]");
    cs2.setDataType("String");
    computedSet.addItem(cs2);

    cs3.setName("Amount");
    cs3.setExpression("dataSetRow[\"QUANTITYORDERED\"]");
    cs3.setDataType("Integer");
    computedSet.addItem(cs3);

    cs4.setName("TotalAmount");
    cs4.setExpression("dataSetRow[\"QUANTITYORDERED\"]");
    cs4.setDataType("Integer");
    cs4.setAggregateFunction("SUM");
    computedSet.addItem(cs4);

    cs5.setName("GroupTotalAmount");
    cs5.setExpression("dataSetRow[\"QUANTITYORDERED\"]");
    cs5.setDataType("Integer");
    cs5.setAggregateOn("MyGroup");
    cs5.setAggregateFunction("SUM");
    computedSet.addItem(cs5);

    // Header
    RowHandle header = (RowHandle) table.getHeader().get(0);

    CellHandle tcell = (CellHandle) header.getCells().get(0);
View Full Code Here

TOP

Related Classes of org.eclipse.birt.report.model.api.PropertyHandle

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.