code for a report