Multiple header rows export not a feature?
Multiple header rows export not a feature?
So I've set up a report in the old DataTables/Tabletools. I wanted to update to the newest Datatables but now the header gets simplified.
<table id='tc' name='tc'>
<thead>
<tr>
<th colspan=16>Title</th>
</tr><tr>
<th rowspan=2>Course Name</th>
<th rowspan=2>Start Date</th>
<th rowspan=2>Total Cost</th>
<th rowspan=2>Cost Per Student</th>
<th colspan=2>Group</th>
<th colspan=2>Group</th>
<th colspan=2>Group</th>
<th colspan=2>Group</th>
<th colspan=2>Group</th>
<th colspan=2>Group</th>
</tr><tr>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
</tr>
</thead>
<tbody>
... Body Content ...
</tbody>
</table>
However, only one header row is exported as follows:
<tr>
<th>Course Name</th>
<th>Start Date</th>
<th>Total Cost</th>
<th>Cost Per Student</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
<th>Qty</th>
<th>Cost</th>
</tr>
I saw a post that Multiple headers are not supported. Given that, how would I go about editing it myself to change how it simplifies the multiple headers into one? As the download page suggests I added the external link to the code, but if it's not supported I think I may just download it and include/modify it locally.
Answers
I should probably also mention that I am only recently moving from the old version of Datatables/Tabletools to the new version in order to resolve a different issue I had with the export.
There is currently no option to export multiple header or footer rows in either TableTools or Buttons.
Allan
I suppose I should have expected that response. Could you point me to where the header is handled for PDFs and CSVs so that I can tinker with it?
This function is where the data to be exported is gathered and would be the starting point.
Allan