Print Subtotal Grouping Row to Excel or Pdf
Print Subtotal Grouping Row to Excel or Pdf
Description of problem:
I have tried to print the grouped table to excel or pdf with the script according to the forum:
@bubomike on discussion https://datatables.net/forums/discussion/45075/export-and-print-for-rowgroup-extension
and from forum : @sciaschi and @elalgarro on discussion https://datatables.net/forums/discussion/42916/row-grouping-with-printing
AND ITS WORK!! Thankyou. But my problem is how to print the subtotal results from the table?
(On Red Circle in Image)
Thank you for your help.
This question has an accepted answers - jump to answer
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
This is sample code =
https://codepen.io/andhyakbar/pen/xxRpQrR
But my problem is how to print the subtotal results from the table?
Thanks for the test case, it helps to see how you implemented it. The bad news is that there isn't an easy way to get that total field into the export. You'll need to hand craft it in, and that would be specific to each of the export types (i.e. XLS, PDF, etc.). For example, this example is swapping space for newlines on the position column - you'll need to scan the document in the same way for the groupings.
This is an area we do intend to improve, a future project is being designed now to improve exporting.
Colin