Correctly invoke the report generation function