Assume that I have a database table like below :
With above given data, I need to create a Pivot Table structured like below :
As my first attempt, I tried with :
Report Class
$this->src('konst_pro')
->query($query)
->pipe(new Pivot(array(
'dimensions' => array(
// 'column' => 'site_name',
'row' => 'site_name, item_name, suborder_code, suborder_qty'
))))
->pipe($this->dataStore('sw_item_order_report'));
Report View
$dataStore = $this->dataStore('sw_item_order_report');
PivotTable::create(array(
'dataStore'=>$dataStore
));
So it gives me below output :
Which is not what I expected.. So any help would be appreciable.
Thanks in advanced !