September 6, 2021, 3:39am
This is super cool, and the details are extremely helpful.
It’s also possible to do most things on the client-side without a custom app. There are a few limitations regarding the available python functions, but it’s been amazing to see how developer-friendly Frappe continues to become:
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:
September 10, 2021, 2:15am
Due to the great response this topic has had, I’ve been updating it frequently as I myself learn more. Should you uncover something yourself then please share that.
Last but certainly not least, thanks for the likes and words of encouragement. It’s good to know you found benefit from reading it.
September 10, 2021, 6:24am
@EugeneP for the excellent write up!
Can this be done also on sites hosted on Frappe Cloud or only for self-hosted sites?
September 10, 2021, 6:27am
I’m not sure. I presume not, since you have to have access to the file system.
September 10, 2021, 6:29am
Yes, you can. Frappe cloud allows you to install arbitrary apps hosted on GitHub to your bench.
September 10, 2021, 8:26am
@peterg! Are you referring to this: https://frappecloud.com/docs/bench/install-custom-app?
I am fairly new to ERPnext and Frappe Cloud. Do you have any links at hand that would describe the process of wrapping what @EugeneP has described above into a custom app?
September 10, 2021, 8:32am
Yes, exactly. You need to create an app on a development bench (instructions
here), then follow EugeneP’s excellent instructions. Then, follow those instructions to deploy to frappe cloud.
Alternately, it’s possible you can do what you need client side. See the link I posted a few messages back for details.
September 10, 2021, 9:31am
@peterg! I’ll check that out.
September 25, 2021, 7:46pm
I’ve updated the tutorial with additional content as I’ve learned more myself and added a section on advanced filters. I hope it’ll come in handy to someone…
this post is actual documentation of script report
Thanks for this
@EugeneP. Just found it. It lools cool.
I am going to start working through this. My aim ?
The existing P&L report handles account 5118 Expenses included in valutaion incorrectly
( in my view anyway ). The pie charts on some of the existing reports shows “group” accounts, which is
not correct in my view. You cant have a pie-chart with “parent” (group) and “child”
info in one chart.
So I am hoping to address this with my own report perhaps.
February 6, 2022, 9:28am
@EugeneP Thanks for taking time into this and sharing with the community. Really appreciate the effort.
February 7, 2022, 12:11pm
Thanks a lot for your sharing effort to explain these report details to the community. It’s really awesome to have contributors like you.
Profile - EugeneP - ERPNext Forum
Thank you sir, it is pretty awesome what u have given to the community
Can you explain How to achieve Selectable rows in script report. e.g
Is there any way to remove the truncated from the names of the chart-legend? Lots of wasted space.
Eugene, your document is spectacular and greatly appreciated.
This is a big long-term maintenance problem.
Have you found a way to include Script Reports into backups, for example?
A symlink into the private files directory would work, I think.
You can store report files in your custom apps folder. Play with the “Is Standart” and “Module” settings. Then the files will be stored in your custom app’s folder.
I see that that works. Thank you.
@EugeneP how can we modified the table row height and width?