Add where condition to generatereport action