KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Excel export using group by column #827

Open Keerthiga opened this topic on on Apr 25, 2019 - 4 comments

Keerthiga commented on Apr 25, 2019

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.

Keerthiga commented on Apr 26, 2019

Hi team, Is there any solution ?? Please advice!

David Winterburn commented on Apr 26, 2019

Hi Keerthiga,

Unfortunately it's currently not possible to group row in Excel's table export. We could make a work around to create total rows for you to export if you want. Let us know your opinion. Thanks!

Keerthiga commented on Apr 26, 2019

Can you please provide any referral links for that?

David Winterburn commented on Apr 26, 2019

Please check this topic to see if it helps in your case: https://www.koolreport.com/forum/topics/791 Thanks!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

Export