| CITY | PROJECT | HOURS | TASK |
|---|---|---|---|
| Neapolis | Army | 386.0 | eirmod et At sed |
| 762.0 | et no diam diam | ||
| Neapolis subtotal | 1148.0 | ||
| Carthago | 926.0 | rebum accusam erat gubergren | |
| Carthago subtotal | 926.0 | ||
| Olympia | Arts | 682.0 | eirmod At ipsum Stet |
| Olympia subtotal | 682.0 | ||
| Neapolis | 835.0 | aliquyam ipsum amet diam | |
| Neapolis subtotal | 835.0 | ||
| Roma | 984.0 | labore nonumy ut sit | |
| Roma subtotal | 984.0 | ||
| Neapolis | Gladiators | 449.0 | ea labore sanctus accusam |
| Neapolis subtotal | 449.0 | ||
| Roma | Taxes | 35.0 | ut Stet voluptua invidunt |
| 147.0 | est justo justo At | ||
| Roma subtotal | 182.0 | ||
| Neapolis | 603.0 | aliquyam tempor amet sanctus | |
| Neapolis subtotal | 603.0 | ||
| Total | 5809.0 |
The decorator API provides more then just the ability to reformat data before it is put into columns, it also provides a hook that allows you perform some action on the table after each row is processed. This allows you to interject some code that allows you to figure out where you are in the list of data, and then insert an additional row with totals, etc... Typically you would use this functionality along with grouping features to spit out some nice web based reports.
See the TableDecorator.finishRow() API documentation, along with the example decorator that is used in this example page.