Total Row For Report View

Hello,

Currently report view doesn’t has total row which is difficult for users to go to another reports to see the total. And I don’t understand why this ‘total row’ is not provided by default.

Anybody know where to customize this?

Tks

@jof2jc, go to the report, Click on Menu > Edit, and add the option, Include Total Row

1 Like

@max_morais_dmm it doesn’t work for report made by report builder

@jof2jc follow this code, this is the rule to add a total row, frappe/query_report.py at 80c6457f0a43933265515234b537bbc5eb52261c · frappe/frappe · GitHub

@jof2jc can you add a screenshot of the report?

here’s report view for PO list. It would be useful if users can see total… Do you have ideas how to add the total? Thanks

@jof2jc

My thoughts on the total feature:

Total row doesn’t exist in report builder reports because the report is too general. Imagine that you have 40000 Sales Invoices and you have to scroll these rows to reach the Total.

Instead, there should be a feature such that you select say 10 rows or 50 rows by dragging and it shows the total of those selected values or it only shows the total of the rows that are visible. Is that acceptable?

@anand yes, it’s ‘dynamic total row’ that will show the total of displayed rows. When users filter/click for more rows then the total is recalculated… It’s very helpful for end-users…

@jof2jc first step: please create a github issue if it doesn’t exist.

It would be great if you or someone from the community can contribute this. Here’s an example of how it can be done in slickgrid: SlickGrid example: Grouping

https://github.com/frappe/erpnext/issues/4608

@anand can you give some hints…where to start in frappe to add total row in report-view? I know it uses slickgrid but don’t have idea where to start in frappe…

Anybody is welcome to collaborate to add this into the product…

It benefits users so they don’t have to go to various reports if report view has total…

Since query reports are not paginated, they have all the data in slick grid already available. So, this example should help: http://mleibman.github.io/SlickGrid/examples/example-totals-via-data-provider.html

Slickgrid is created here in query reports: frappe/query_report.js at develop · frappe/frappe · GitHub