Writing the html_report() function