We have created custom query report, our query is working fine and in erpnext v 12 we are getting data also.
We need to add custom filter in our report, how we can do it? Where we need to update js / python code for the filters?
We have created custom query report, our query is working fine and in erpnext v 12 we are getting data also.
We need to add custom filter in our report, how we can do it? Where we need to update js / python code for the filters?
try Script Report
In script report on server new python and js files are created but in our local development setup python and js files are not created.
Do you have any step by step guide for script report?
Which version of erpnext are you using?
Version 12 already mentioned in above post
enable developer mode first by adding
“developer_mode”: 1
in site_config.json
then kill the bench start by ctrl + c and then run again bench start
after that your files will be stored on local .py, .json and .js
https://frappeframework.com/docs/user/en/guides/reports-and-printing/how-to-make-script-reports
Enable developer Mode
We did and create the report but our query is not working.
I have been trying to create a report which displays the following fields :
I am using the following query, but not working :
frappe.db.sql(“”“select tabTimesheet
.start_date, tabTimesheet
.employee, tabTimesheet
.employee_name,
tabTimesheet Detail
.from_time, tabTimesheet Detail
.to_time, tabTimesheet
.total_hours,
tabTimesheet Detail
.activity_type, tabTimesheet Detail
.task, tabTimesheet Detail
.project,
from tabTimesheet Detail
, tabTimesheet
inner join tabTask
on tabTask
.name = tabTimesheet Detail
.task
where tabTimesheet Detail
.parent = tabTimesheet
.name and %s order by tabTimesheet
.name”“”%(conditions), filters, as_list=1)