I made a sample script report with dynamic columns. In print I want to get column values I tried this code below but I got an error Uncaught ReferenceError: columns is not defined. Any idea how to get the columns values?
Please check how frappe gets the columns names and data from report: columns , data
This is done by micro-templates so you first need to pass dictionary to your print format template
for example:
Thanks for the reply. The link you gave me is the source of frappe so I am in the impression that data and columns are default pass to the print format as I see the code frappe/print_grid.html at develop · frappe/frappe · GitHub that it can access the columns variable in the print format because when I do this code below data has a value but columns is undefined. So why I can access data but not the columns?
I was able to figure it out how to get the columns value in the print format template using report.columns example is in erpnext/accounts/report/financial_statements.html