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.
NCP
May 3, 2022, 5:41am
2
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.
eg.
If you have not checked then check it, please.
https://frappeframework.com/docs/v13/user/en/guides/reports-and-printing/how-to-make-script-reports
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?
Even we struggled quite long to bring the basic output. Finally got the basic output without making the script report to Standard.
Created a Script report and kept Is Standard to “NO”
Configured columns like below
[image]
In the query/Script section returned the simple result
[image]
result = [{“quotation”: “Here is a message”, “ebitda”: “abc”}, {“quotation”: “Here is the quote”, “ebitda”: “cba”}]
for now client code section is like below. Ideally we should be able to configure filter…
NCP
May 3, 2022, 6:32am
4
Mohsin1990:
charts
Please check the js file of a base report for Charts.
Thanks.
Here’s a short tutorial describing script reports with charts:
Hi all,
I’ve been playing around with the new client-side scriptable reports in v13, and they are immensely powerful. Documentation and examples are a bit limited, however, so I thought I’d share a not-quite-minimum working example to help others discover and use this feature. The report I’ll describe here is as basic as they get, but it should be a solid start for anyone looking to design something more powerful.
First, here’s what our simple example will look like when completed:
[25%20PM] …
2 Likes