Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
All of web's and excel's PivotMatrix and PivotTable widgets have a property called "emptyValue" which is default to "-". Set it to 0 like this in the excel view for your case:
//MyReportExcel.view.php
\koolreport\excel\PivotMatrix::create(array(
...
"emptyValue" => 0,
));
Pls open the file koolreport/pivot/PivotUtil.php
and add the following line to function computeDataCellMaps():
protected function computeDataCellMaps()
{
$cMetas = $this->dataStore->meta()['columns'];
$cellMap = Util::get($this->map, 'dataCell', function ($v, $info) use ($cMetas) {
if (!isset($v)) return $this->emptyValue; // add this line
We will apply a fix in the next version of KoolReport. Rgds,
Sorry, pls add this line in function __construct as well:
public function __construct(&$dataStore, $params = [])
{
...
$this->totalName = Util::get($this->params, 'totalName', 'Total');
$this->emptyValue = Util::get($this->params, 'emptyValue', '-'); // add this line
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo