View source
CITY PROJECT HOURS TASK
Roma Army 221.0 justo nonumy duo et
301.0 justo amet diam labore
394.0 diam consetetur Lorem aliquyam
Roma subtotal916.0
Carthago Army 625.0 eirmod dolore dolor ut
Carthago subtotal625.0
Olympia Army 685.0 eirmod magna rebum nonumy
Olympia subtotal685.0
Neapolis Army 763.0 et labore erat sanctus
896.0 magna diam consetetur tempor
Neapolis subtotal1659.0
Carthago Gladiators 70.0 et ut gubergren elitr
Carthago subtotal70.0
Neapolis Gladiators 292.0 diam clita sadipscing et
837.0 sed duo accusam est
Neapolis subtotal1129.0
Total5084.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.