@Tropicalrambler you should refer this frappe/frappe/public/js/frappe/views/reports/query_report.js at develop · frappe/frappe · GitHub
Using the same approach I used here you will be able to achieve that
@Tropicalrambler you should refer this frappe/frappe/public/js/frappe/views/reports/query_report.js at develop · frappe/frappe · GitHub
Using the same approach I used here you will be able to achieve that