I wan't to create report from the result of an olap Query, the result type is a cellSet. Does any one have any idea.
thx
The easiest way to print out results is by using one of the built-in formatter. There is an example available here.
To programmatically iterate over the axis and positions of a CellSet, you need to iterate over each axis, then each position on the axis. A simple CellSet with two axis (with ordinals known in advance) can be iterated over like so:
// Iteration over a two-axis query
for (
Position axis_0
: data.getAxes().get( Axis.ROWS.axisOrdinal() ).getPositions())
{
for (
Position axis_1
: data.getAxes().get(Axis.COLUMNS.axisOrdinal()).getPositions())
{
Object value =
data.getCell(axis_0, axis_1)
.getValue();
}
}