Filter wih query in report

Hi,

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

Thanks,
Bobby

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

Ya i know that, my problem is in the js

"filters": [
    {
        "fieldname":"company",
        "label": __("Company"),
        "fieldtype": "Link",
        "options": "Company",
        "default": frappe.defaults.get_user_default("company"),
        "reqd": 1
    },{
        "fieldname":"account",
        "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