Hi there,
has anybody managed to get an Excel Export from PIvotSQL Matrix? I basically followed this Sample: https://www.koolreport.com/examples/reports/excel/pivotmatrix/ But when I export to Excel it will always default to the initial report, even if I change rows, columns and aggregates. On the example the download reflects the current state of the report.
Any idea, what I´m doing wrong?
KoolReport is running inside of Laravel.
Thanks a lot for any hint! Bastian
This is my report.php file:
$this->src('database')
->query("select * from sales where SalesDate >='" . $this->params['daterange'][0] . "'
and SalesDate <='" . $this->params['daterange'][1] . "'")
->pipe(new \koolreport\pivot\processes\PivotSQL([
"column" => "Status",
"row" => "Client",
"aggregates" => array(
"count" => "*",
"sum" => "OrderValue"
),
]))
->pipe(new ColumnMeta(array(
"OrderValue - sum" => array(
'type' => 'number',
"prefix" => "€",
),
)))
->pipe($this->dataStore('pivotData'));