All report generation code here