Hi all,
I have created a BIRT report with Table (using java), its working fine
But when i add grouping to Table, it throws error
Exception in thread "main" java.lang.NullPointerException at org.eclipse.birt.report.model.writer.BoundColumnsWriterMgr.appendBoundColumnsToGroup(BoundColumnsWriterMgr.java:159)....
.....
....
i referred examples given in
http://demo.spars.info....
org.eclipse.birt.chart.examples.report.api.SalesReport
and also many others...
here is my code snippet of Table Group (need grouping on WORKDEPT)
{
TableGroupHandle group = elementFactory.newTableGroup();
group.setKeyExpr("row[\"WORKDEPT\"]");
RowHandle grpHdrHandle = elementFactory.newTableRow(3);
CellHandle tblCellHandle = (CellHandle) grpHdrHandle.getCells().get(0);
tblCellHandle.setDrop(DesignChoiceConstants.DROP_TYPE_DETAIL);
data = elementFactory.newDataItem("workdept");
data.setResultSetColumn("dataSetRow[\"WORKDEPT\"]");
tblCellHandle.getContent().add(data);
group.getHeader().add(grpHdrHandle);
table.getGroups().add(group);
}
i spent nearly one week for solution, most of all the examples in google i tried,
all code is similar to mine, no change.
i guess error in the setKeyExpr(""); , this column binding is not happening properly.
Any working example of TableGroupHandle (simple one) would help me a lot..
Thanks in advance
VG