Filter wih query in report


I wonder how i can custom the filter in my custom report , i want to have a filter the report by account with bank types


You can add filter for custom query/script report. Check Reports

Ya i know that, my problem is in the js

"filters": [
        "label": __("Company"),
        "fieldtype": "Link",
        "options": "Company",
        "default": frappe.defaults.get_user_default("company"),
        "reqd": 1
        "label": __("Accounts"),
        "fieldtype": "Link",
        "options": "Account", <<<<<<< i dont want to show all account but just bank account
        "reqd": 1,
        "width": "60px"

how i can do that ?

Mention get_query property for that.

Check erpnext/accounts_receivable.js at develop · frappe/erpnext · GitHub

1 Like

wow thats works,

Thanks nabin