Create a report with filters

How can I create a report, or just webpage to show a result from user filter?

In other words… I need, for example, a Page to show 4 fields of filter… and a button so user can click, and filter all records and show to user…

Any idea how to do that?

Thanks!

Hello @fellipeh,
Add field under standard filter you will automatically get filter in report.

Hi @bhavikpatel7023 thanks for your reponse…

Maybe I misunderstood… I do not need a DocType “Editor”… i have a doctype, I populate these doctype automatically… So I just need to show all record from these doctype… but I need to show all record and make possible to user filter and/or print that… I trying to do a “Cash flow” to my users… so… I show need a page to show/filter/print all record from doctype…

@fellipeh
Could you describe it thought screens shot?

Sure @bhavikpatel7023 Like these:

Filters: 
+------------------------------------------------+
|  Start Date: ______        End Date: _________ |       [ Filter Button ]
+------------------------------------------------+

+--------------------------------------------------------------------------------+
|  Date      |   Description                 |  Value         |   Current Value  |
+--------------------------------------------------------------------------------+
| 01-01-01   | Initial                       |         0.00   |          0.00    |
| 02-01-01   | Order #123                    |       100.00   |        100.00    |
| 02-01-01   | Order #342                    |        50.20   |        150.20    |
| 03-01-01   | Buy some Candies              |        10.00   |        140.20    |
+--------------------------------------------------------------------------------+

In the top, we have some fields for Filter (for example: Start and End Date) and a Button, to run the filter function…

In the Bottom, we have the result of the filter… a page to show some info, in these case: Date, Description, Value, Current Value…

I think to do that, link a “Query Report” but I don’t know how to show a user Filter Screen before to generate the report… and in these case the bottom is a report…

This might be helpful.

https://frappe.io/docs/user/en/guides/reports-and-printing/how-to-make-query-report

@bhavikpatel7023

I looked the link, but it’s not what I`m looking… or I do not know how to use…

I need to create a report, but I need to create a new columns, columns that not exist on my DocType… and make some calculations in each column…

On video, only show how to use the own fields to show to user…

Is there anyway to do that?

Other question: These kind os report (like showed on video) is saved on database, or on file… if it’s saved on dataabse, I need to create the same report for each site I have… :frowning:

@fellipeh
Here you can’t use button for filter as per standard documentation but you can use filter without button.

Ok @bhavikpatel7023 . now problem with that (the button)

My major problem is: I need to make some “calculation”, I need to create 3 new column, that not exists original in my DocType… and for each record I need to make some calculation, and show on the report…

Other Problem: I need these report on “normal file” not only inside customer database, to distribute for all customers…

Can I do that?

@fellipeh did you set the filters fields in your js file?

@fellipeh
Use SQL query to make calculation.