How to create a Script Report in V13

Hi, I’m trying to create a script report using the report doctype. I already create reports using both report builder and query report but I had some queries that need filters like today’s date. so I thought the best option is to use script report.

However, I couldn’t find clear documentation explains how to use the new version of the script report in ERPNext version 13.

As you see below I type the python script to run the execute function but nothing is showing the report page.

Hi @Mohsin1990,

Server Script Report does not work inside of erpnext.
It’s worked on the backend side.

Filter code will be work on js.
The query will be set on py.

Simple Server script reports.
please check it.

If you have not checked then check it, please.

Thank You!

Well, this post was very helpfull. It should be written in specific format
But still I need to know the same format for creating charts.
Any ideas?

Please check the js file of a base report for Charts.


Here’s a short tutorial describing script reports with charts: