Hi, I would like to display excel report like below screenshot.
I have tried group by function in my export file
Table::create(array(
"dataSource" => $this->dataStore('result'),
"grouping"=>array(
"business_name"=>array(
"calculate"=>array(
"{sumSale}"=>array("sum","quoted_sale"),
"{sumCost}"=>array("sum","quoted_cost"),
"{sumProfit}"=>array("sum","profit"),
),
"top"=>"<b>Customer Name : {business_name}</b>",
"bottom"=>"<td></td><td style='text-align:right'><b>Total</b></td><td>{sumSale}</td><td>{sumCost}</td><td>{sumProfit}</td>",
),
),
"showFooter"=>true,
"columns"=>array(
1,2,3,4,5,6
)
));
but, it was not working. I have used normal table not pivot table. Can you please advice to export excel using groupby function. Thanks.