Query Report filter apply

How we can add select type filter in query report and use its value in sql query?

follow this report erpnext/erpnext/accounts/report/account_balance at develop · frappe/erpnext · GitHub

In your report.js file add this dictionary in filters with your appropriate options.

{
			fieldname: "root_type",
			label: __("Root Type"),
			fieldtype: "Select",
			options: [
				{ "value": "Asset", "label": __("Asset") },
				{ "value": "Liability", "label": __("Liability") },
				{ "value": "Income", "label": __("Income") },
				{ "value": "Expense", "label": __("Expense") },
				{ "value": "Equity", "label": __("Equity") }
			],
		},

@Samsul @saakib10

I want to create report only using report doctype. i dont want to hard code it.

You add filter like this.
And add these filters into the query using %(start_date)s

For example

SELECT qty_after_transaction FROM tabStock Ledger Entry where posting_date <= %(start_date)s

There is a full video on this here

i want to use select field type here and its selected value in query