I have added 4 filters in my script report and it works fine. But i want to improve in some how.
Like there are 4 filters.
From Date
To Date
Department
Employee
Now if i select department then in Employee filter, i only want to show employee which belongs to selected department. What should i do to achieve this ?
What is the meaning of this doctype, txt, searchfield, start, page_len, filters ? am i need to make changes according to my Doctype/ Report or keep it same as given ?
Also,
It Throws error while selection employee filter.
return frappe.db.sql(ââ" select name from tabEmployee where department=â{0}â ââ".format(filters.department))
Error :
AttributeError: âNoneTypeâ object has no attribute âdepartmentâ