Using callbacks to show totals

CITY PROJECT HOURS TASK
Neapolis Army 386.0 eirmod et At sed
762.0 et no diam diam
Neapolis subtotal1148.0
Carthago 926.0 rebum accusam erat gubergren
Carthago subtotal926.0
Olympia Arts 682.0 eirmod At ipsum Stet
Olympia subtotal682.0
Neapolis 835.0 aliquyam ipsum amet diam
Neapolis subtotal835.0
Roma 984.0 labore nonumy ut sit
Roma subtotal984.0
Neapolis Gladiators 449.0 ea labore sanctus accusam
Neapolis subtotal449.0
Roma Taxes 35.0 ut Stet voluptua invidunt
147.0 est justo justo At
Roma subtotal182.0
Neapolis 603.0 aliquyam tempor amet sanctus
Neapolis subtotal603.0
Total5809.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.