Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

Total calculation of table is not showing up in pdf after download.(Tabulator Js)

$
0
0

I am using tabulator js for table generation and exporting it into pdf.

Table generated using tabulator is showing total table calculation in table footer but after downloading pdf there is no table footer. (i.e. there is no total calculation showing up).

Here is the screenshot of html table generated using tabulator. enter image description here

let table = new Tabulator(selector, {
columnCalcs: "both",
columnVertAlign: "bottom", //align header contents to bottom of cell
data: tableData, //assign data to table
//Pre-format tabulator raw data before downloading
downloadDataFormatter: function (data) { //data - active table data array   
  //change calculations group info and reformat currency values
  data.calcs = updateTotalColumn(data.calcs);
  data.calcs = reformatCurrencyCalculations(data.calcs);
  data.calcs = renameGroupKeysforCalcs(data.calcs);
  //Update Row headers appending prev headers
  data.data = subGroupHeader(data.data);
  //return data for download
  return data;
},
downloadConfig: {
  columnGroups: true,
  rowGroups: true,
  columnCalcs: true
},
layout: "fitData", //fit columns to width of table
groupBy: groupByData,
groupStartOpen: groupOpenAtLoad,
groupHeader: groupHeaders,
groupToggleElement: groupToggleElement,
columns: tableColumns

});


Viewing all articles
Browse latest Browse all 67411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>