KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

In Table need to display a footer with total of a column for each page seperately #1435

Open Tech Apps opened this topic on on May 9, 2020 - 6 comments

Tech Apps commented on May 9, 2020

In Table need to display a footer with total of a column for each page separately

i can able to add a footer for table with sum. its displaying the total of the datasource records, but i want it to be display for that page column total alone in footer.

is that possible? kindly give a solution

Thanks...

KoolReport commented on May 9, 2020

Do you mean that you want to have a table with pagination and each page has sum of a column.

Tech Apps commented on May 10, 2020

yeah, correct . like that i need

KoolReport commented on May 11, 2020

I see, Table does not have this feature by default however you can make it. We have an event called "pageChanged". This client event is fired when user change table page. It returns you the new start Index. Also you are able to get data of each row by using getRowData(index) method.

So what I suggest you to do is to make a function which received (index of start row) and the output is the footer of table. You will call this function at beginning of table to generate footer, and at event "pageChanged" so that every time user change page, it will generate again the footer.

Hope my answer helps. Let me know if you need further assistance.

MarkoS commented on Dec 21, 2020

Hi all, I am looking for similar solution but bit different. I have Search feature enabled and would like to Sum values in column for results matching search (filter). I do get sum but when I use filter it does not recalculate the sum for new filtered items.

How to use this callback to recalculate only newly displayed items?

Thanks

KoolReport commented on Dec 22, 2020

@Markos: Let say you have a search filter, after post back to server for "searching term", you query data by that searching term and display result on Table, you provide the footer sum there in table. As a result the sum at footer is the sum of searched data only.

MarkoS commented on Dec 22, 2020

HI there, I have found solution on this forum, one of users figured out how to use callback function to recalculate sum on every change.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None