Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
for the total like this from his KoolReport.
And for the initial code like this. ->pipe(new Pivot(array(
"dimensions"=>array(
"column"=>"orderYear, orderMonth",
"row"=>"customerName, productLine, productName"
),
"aggregates"=>array(
"sum"=>"dollar_sales",
"count"=>"dollar_sales"
)
)))->saveTo($node2);
$node2->pipe($this->dataStore('sales'));
And I want every number in this total to be clickable as an href link.
How to? Please help.
I intend to make it like this.
->pipe(new Pivot(array(
'dimensions'=>array(
'row'=>'Type_Rank,Name_Rank',
),
'aggregates'=>array(
<a href=''item.php?name=@value''>'+ DSP_O, Riil_O, Perc_O, DSP_N, Riil_N, Perc_N, DSP_Total, Riil_Total, Perc_Total +'</a>
//'sum'=>'DSP_O, Riil_O, Perc_O, DSP_N, Riil_N, Perc_N, DSP_Total, Riil_Total, Perc_Total',
)
)))
Pls try to use the "map" property of PivotTable for creating the links:
//MyReport.view.php
PivotTable::create(array(
...
"map" => array(
"dataCell" => => function ($value, $cellInfo) {
return "<a href='item.php?name=$value'>";
}
),
));
Let us know if it works for your case or not. Tks,
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo