Get KoolPHP UI with 30% OFF!

Pivot sum field headers

I've added three sum fields to my pivot table. Each one says something like
"Sum of 2014-01-01"
Is there a way to modify the header to just say "cost", "amt_due", or "leads”?
(The Add Image control in the forum editor does not work.)
cost amt_due leads | franchise date
catetory type campaign | franchise1
| date1 date2 date2
| Sum of date1 | Sum of date1 | Sum of date1 <---- I'd like these to say "cost Sum of date1" "amt_due Sum..." "leads Sum..."
CODE minus top part...
    $pivot = new KoolPivotTable("pivot");
    $pivot->scriptFolder = $KoolControlsFolder ."/KoolPivotTable";
    $pivot->styleFolder = "office2007";
    $pivot->DataSource = $ds;
	//Turn on ajax features.
	$pivot->AjaxEnabled = true;
	//Set the Width of pivot and use horizontal scrolling
	//$pivot->Width = "1200px";
	$pivot->HorizontalScrolling = true;
	//Set the Height of pivot and use Vertical Scrolling
	//$pivot->Height = "1000px";
	$pivot->VerticalScrolling = true;
	//Allow filtering
	$pivot->AllowFiltering = true;
	//Allow sorting
	$pivot->AllowSorting = true;
	//Allow reordering
	$pivot->AllowReorder = true;
    $pivot->Pager = new PivotPrevNextAndNumericPager();
    $pivot->Pager->PageSize = 30;
    $pivot->AllowCaching = true;
    $field = new PivotSumField("cost");
    $field->FormatString = "\${n}";
    $field = new PivotSumField("amt_due");
    $field->FormatString = "\${n}";
    $field = new PivotSumField("leads");
    $field = new PivotField("category");
    $field->Expand = true;
    $field = new PivotField("type");
    $field->Expand = true;
    $field = new PivotField("campaign");
    $field = new PivotField("franchise");
    $field->Expand = true;
    $field = new PivotField("date");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <form id="form1" method="post">
        	<?php echo $koolajax->Render();?>
        	<div style="padding-top:10px;">
		        <?php echo $pivot->Render();?>
Posted Jan 4, 2016 , edited Jan 7, 2016 Kool
Hi Kelly,
You would have to modify the source code of koolpivottable.php a bit. Please open the file and looking for "function RenderHeaderTotal" inside "class PivotSumField extends PivotField". Then in the function body which looks like:
function RenderHeaderTotal(...) {
      return <an expression>;

please change the return command to like:
function RenderHeaderTotal(...) {
      return <an expression> . $this->FieldName ;

That would add the field name to the last of the header. Please let us know if there's any issue. Thanks!
Best regards,
David Winterburn
Support and Development Team
Posted Jan 13, 2016 , edited Jan 13, 2016 Kool