public interface GroupColumn
GroupCalculator (like SUM, AVG, MIN, MAX etc.) to at least one of the data columns of the tableGroupCalculators
Let’s see an example with my monthly expenses. For the input:
August food 500$ August gas 300$ September food 567$ September gas 154$ September fun 200$If we declare the first column as a group column and we add a Sum calculator to the last data column then ReportEngine will make sure to display the totals at each change in the values of the first column:
August food 500$ August gas 300$ Total August 800$ September food 567$ September gas 154$ September fun 200$ Total September 921$ Grand Total 1721$Other settings available for the group columns are:
FlatTable table = new FlatTableBuilder()
...
.addGroupColumn( ... group column here ...)
...
.addDataColumn( ... data column here ... )
.addDataColumn(... data column here ... )
...
.build();
| Modifier and Type | Method and Description |
|---|---|
String |
getFormattedValue(Object object)
returns the formatted value for the given object according to the
formatting rules of this grouping column
|
int |
getGroupingLevel()
getter for the priority of this column
The grouping levels start with 0 (the most important), 1, 2, 3 ..
|
String |
getHeader()
this appears in the final report as the title/header of the column
|
HorizAlign |
getHorizAlign()
returns the horizontal alignment of the values of this column
|
SortType |
getSortType()
whether you want to sort this ascending or descending
|
Object |
getValue(NewRowEvent newRowEvent)
getter for the current value on this column
|
VertAlign |
getVertAlign()
returns the vertical alignment of the values of this column
|
boolean |
showDuplicates()
whether or not this group column should display duplicate group values.
|
String getHeader()
int getGroupingLevel()
Object getValue(NewRowEvent newRowEvent)
newRowEvent - the new row eventString getFormattedValue(Object object)
object - an unformatted valueHorizAlign getHorizAlign()
VertAlign getVertAlign()
boolean showDuplicates()
| Europe | South | 100 |
| Europe | North | 207 |
| Europe | East | 103 |
| Europe | West | 120 |
| Europe | South | 100 |
| North | 207 | |
| East | 103 | |
| West | 120 | |
| Asia | South | 300 |
| North | 267 | |
| East | 564 | |
| West | 122 |
SortType getSortType()
Copyright © 2006–2015. All rights reserved.