Query Report Custom Template

i want to customize print of Balance Sheet Report.
i know the file being used as the template is apps/erpnext/erpnext/accounts/report/financial_statements.html

i found the submit action dialog was in apps/frappe/frappe/public/js/frappe/views/reports/query_report.js

but i had no idea where the html file is called, so i don’t know which code to override in the javascript.

any help appreciated.