Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
We have not had default count null or non-null for column yet so here is a solution:
<?php
$count_mycolumn = 0;
$this->dataStore("mystore")->popStart();
while($row = $this->dataStore("mystore")->pop())
{
if($row["mycolumn"]!=null)
{
$count_mycolumn++;
}
}
Table::create(array(
"dataSource"=>$this->dataStore("mystore"),
"showFooter"=>"bottom",
"columns"=>array(
"mycolumn"=>array(
"footerText"=>"$count_mycolumn";
)
),
...
));
?>
As you can see, the above code will read dataStore and count the non-null in mycolumn. Then it show at footerText of that column. You can use number_format()
to format the count number as you wish.
Hope that helps.
Please let us know if you need further assistance.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo