Using callbacks to show totals

CITY PROJECT HOURS TASK
Olympia Army 280.0 vero et magna amet
Olympia subtotal280.0
Neapolis Arts 593.0 ut est invidunt clita
Neapolis subtotal593.0
Carthago Arts 597.0 et sanctus At amet
616.0 sadipscing sed duo takimata
Carthago subtotal1213.0
Neapolis Arts 727.0 ut Stet diam ut
Neapolis subtotal727.0
Carthago Gladiators 392.0 tempor et dolor magna
Carthago subtotal392.0
Neapolis Gladiators 505.0 ea et justo invidunt
Neapolis subtotal505.0
Olympia Gladiators 795.0 sed tempor et rebum
Olympia subtotal795.0
Roma Gladiators 850.0 no Stet Stet Lorem
Roma subtotal850.0
Olympia Taxes 893.0 accusam sed labore aliquyam
Olympia subtotal893.0
Total6248.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.