Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Hi there,
To do that, before saving your data to a data store, please change the column meta like this:
$node->pipe(new ColumnMeta(array(
"PNS"=>array(
"type" => "number",
"thousandSeparator" => ",",
"decimalPoint" => ".",
"decimals" => 0,
),
)))->pipe($this->dataStore('myDataStore'));
Please let us know if this works for you. Thanks!
HI there,
In the case of pivot, just change the column meta of the aggregated/sum column before processing with pivot. Then in the the pivot table that format will be used:
$node->pipe(new ColumnMeta(array(
"jml"=>array(
"type" => "number",
"thousandSeparator" => ",",
"decimalPoint" => ".",
"decimals" => 0,
),
)))
->pipe(new Pivot(array('dimensions'=>array('column'=>'status','row'=>'lingkup,'),'aggregates'=>array('sum'=>'jml'))))
->pipe($this->dataStore("bpk"));
Well, if you use the same result datastore for both web and excel export then the format certainly is the same. The simplest way you could do is to create 2 datastores with different meta like this:
$node->pipe(new ColumnMeta(array(
"jml"=>array(
"type" => "number",
"thousandSeparator" => ",",
"decimalPoint" => ".",
"decimals" => 0,
),
)))
->pipe(new Pivot(array('dimensions'=>array('column'=>'status','row'=>'lingkup,'),'aggregates'=>array('sum'=>'jml'))))
->pipe($this->dataStore("bpkExcel"));
$node->pipe(new Pivot(array('dimensions'=>array('column'=>'status','row'=>'lingkup,'),'aggregates'=>array('sum'=>'jml'))))
->pipe($this->dataStore("bpkWeb"));
Then in the excel export file, use the bpkExcel for exporting instead of bpkWeb. Please try this and let us know if there's a problem. Thanks!
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo