How to add progress bar in query report

how to add progress bar in query report? i i know there’s frappe.show_progress but i dont know where to put it in code. anyone have any idea?

1 Like

I woud suggest using background prepared report to do time and resource consuming report. The frappe script report main method is simply a callback with specific return to the frappe core . I think that’s the way Frappe reporting model was designed.

You can see the frappe source https://github.com/frappe/frappe/blob/develop/frappe/core/doctype/report/report.py . The “run_query_report” method simply call our report script to get specific data and nothing else being fetched.

im sorry but what do you mean by prepared report?

Erpnext have a Prepared Report mechanism , which means that the report is not shown instantly and need to be generated in the background first. The documentation is here ==> https://docs.erpnext.com/docs/v13/user/manual/en/setting-up/articles/prepared-report

For example, the Stock Balance report in Stock module of manufacturing process is a kind of prepared report that will not be shown instantly.