Dear support team,
I'm impressed about the easy use of koolreport and the great support from your side!
I have purchased all the packages, also Pivot as well.
I could create / modify the sample pivot example and it looks as follows:
My setup:
<?php require_once "../koolreport/autoload.php"; use \koolreport\processes\Filter; use \koolreport\processes\ColumnMeta; use \koolreport\pivot\processes\Pivot; use \koolreport\processes\Group; use \koolreport\processes\Sort; use \koolreport\processes\Limit;
class autoreppivot extends koolreport\KoolReport {
function settings()
{
...
}
function setup() {
$node = $this->src('sales')
->query("SELECT Geschaeftsjahr, Monat, WerbegruppeVerbund, NikonKdName, Verkaufsmenge, Umsatz FROM Reporting.autorep_v_noNulls")
->pipe(new Pivot(array(
"dimensions" => array(
"column" => "Geschaeftsjahr, Monat",
"row" => "WerbegruppeVerbund, NikonKdName"
),
"aggregates"=>array(
"sum" => "Umsatz",
"count" => "Verkaufsmenge"
)
)))
->pipe($this->dataStore('Reporting.autorep_v_noNulls'));
} }
And my *.view.php:
<?php use \koolreport\pivot\widgets\PivotTable; ?>
Nikon AutoRep-Pivot
Umsätze nach Werbegruppe-Ort-Kundenname
<?php PivotTable::create(array( "dataStore"=>$this->dataStore('Reporting.autorep_v_noNulls'), /* 'measures'=>array(
'Pivot-Column-Title'
),
'rowCollapseLevels' => array(1), 'columnCollapseLevels' => array(0, 1, 2), */ 'totalName' => 'GESAMT'
)); ?>
Now my issue: - When I deactivate the PivotTable attributes code lines for measures, rowCollapseLevels, coulumnCollapseLevels then I can retrieve the values sum / count as defined in the controller (see screenshot please) - BUT: When I activate these lines --> no results!!
Are there any syntax errors?
Kind regards, bysystem