More work on the report - including functions.