fix for getting the report as per the new database structure...