Using filter for Query Report in ERPNext v13

Dear All,
Please help me how to use filter on a Custom Query report of version 13. This version does not create backend file for new report.

I’d like to filter opening_date by from_date and to_date


Hi @hanntd

Following links will help you understand the query better for V13

Hi Nikunj_Patel,

I tried to test as you guided but I have an error message when show report:


You have to define the filter in the filters section with the exact name that you use in the query
Mark the filter as mandatory. This is just to ensure the report doesn’t run with empty key value. Donot use the filter in the query until you make a refresh.
Refresh the browser once.
Run the report once.
you should now see the filter field.
Go back to the query and add the filter in the query. Whatever you have done in the query is correct.
save the query and run the report. Refresh the browser once. Just to ensure your changes are propagated.
Key in the filter value. You should now see the results.

There is a thread i have opened seeking answers to default the value for a filter. If you have already found the solution please respond.

Thanks @gsarunk so much, I have successful added filter as your guide.

1 Like

I have found another way to define filters and default their values. Updated in the thread V13-How to default the filter value in Query reports.

This will also help you.