Hi I ma using a SuperCube and Datatable widget. I have issues with the header
this is the report code
function setup()
{
$this->src('db')
->query('CALL getSplitRewardReportFrom(:year)')
->params(array(
":year"=>$this->params["year"],
))
->pipe(new SuperCube(array(
"rows" => "teacher_id, id_number",
"columns" => "hour_num",
"max" => 'profession_id, class_id',
"sum" => "total_hours"
)))
->pipe(new \koolreport\processes\RemoveColumn(array(
'{{all}}','{{others}}'
)))
->pipe($this->dataStore("st"));
}
And this is the view code
<?php
DataTables::create(array(
"name" => "myTable",
"language" => "he", //use 'DataTables.de.json'
"dataSource"=>$this->dataStore("st"),
"emptyValue" => "", // use an empty string as filler for empty values
"options"=>array(
"colReorder"=>false,
'autoWidth' => false,
"order"=>[],
'ordering' => false,
'columnDefs' => array(
array(
'visible' => false,
//'targets' => [$this->monthDays+6], //hide the first column
)
),
),
'complexHeaders' => true,
'headerSeparator' => ' - ',
"groupCellsInColumns" => [0, 1], // group similar cells in columns
'cssClass'=>array(
'table'=>'table table-bordered',
'tr'=>'cssItem',
'td'=>function($row,$colName)
{
return in_array($colName, array('teacher_id','id_number')) ? 'border-dark text-right' : 'border-dark text-center';
},
'th'=>function($colName)
{
return in_array($colName, array('teacher_id','id_number')) ? 'table-dark border-dark text-right' : 'table-dark border-dark text-center';
},
),
));
echo '<div class="footer print-only">'.lang('tts.print_footer').'</div>';
?>
This is the result header that I get
- how do I remove the {{all}} | profession_id column.
- How to I remove the hour_num top header that was generated.
- How to I update a label of a column like 1 | profession_id and the one in the bottom called max?