KoolReport's Forum

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

Table footer - count #111

Open Peter Gregory opened this topic on on Sep 13, 2017 - 5 comments

Peter Gregory commented on Sep 13, 2017

Hi, I see the table footer allow Avg, Sum etc but not Count ? I would like to be able to put a count of the number of rows in the table into one of the footer cells... is this possible in another way please ? thanks Peter

KoolReport commented on Sep 14, 2017

That's great suggestion. Thanks Peter, we will add this count feature for footer.

For now you can do this:

Table::create(array(
    "dataStore"=>$this->dataStore("datastore_name"),
    "showFooter"=>"bottom",
    "columns"=>array(
        "my_column"=>array(
            "footerText"=>"".count($this->dataStore("datastore_name")->data())
        )
    )
))
Peter Gregory commented on Sep 14, 2017

Great - thank you for the other way to do this - it works great.... just about to purchase the pivot & input add-ones :-)

KoolReport commented on Sep 14, 2017

That's awesome. Thank you very much for supporting us.

tee commented on Oct 4, 2017

Hi support team,

Is it possible to show footer of every column as sum by default without placing "footer"=>"sum" for every column? Thanks.

KoolReport commented on Oct 4, 2017

You can do:

"columns"=>array(
    "{others}"=>array(
        "footer"=>"sum",
    )
)

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
suggestion

None