Show total in the footer in Export PDF/Excel, with use of (scroll: true) in datatable
Show total in the footer in Export PDF/Excel, with use of (scroll: true) in datatable
I am using (scroll: true) in datatable, for load and show large data fast. But when I scroll the table it changes the total in the footer because it loads 99 rows every time. my table is client-side.
Now, when I export PDF /Excel, every data export but the total is not shown correctly because it's a total of only 99 records.
Now, how can I export all records with the total in the footer?
And how can I show the total in the datatable footer with the use of (scroll: true)?
note:
- I need to show the total in the footer of all records so, I did not use pagination.
- I am using column search so, the total of all filtered records changes every time when searching, and only filtered records will export in PDF/Excel.
Answers
Minimally you should post your Datatables initialization code so we can see exactly what you have to offer suggestions. If the problem is not obvious we will ask you to post a link to your page or a test case replicating the issue to help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin