KoolReport's Forum

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

Want to display table data on table header #63

Open tee opened this topic on on Aug 5, 2017 - 12 comments

tee commented on Aug 5, 2017

Hi KoolReport,

From the table below, i want to have only one column instead of two columns which displays '06/01/2012' on table header since it is repeated and all values of Apples on table data without showing Apples. How to do it? Appreciate it.

KoolReport commented on Aug 5, 2017

Hi,

You do this:

Table::create(array(
    "removeDuplicate"=>array("date")
    ...
));
tee commented on Aug 7, 2017

Hi,

What I meant was from the above table i want it to become like this as shown below. Does KoolReport able to do it? Appreciates.

KoolReport commented on Aug 7, 2017

It is possible. Please do this:

<?php
$date = $this->dataStore("name_of_store")->data()[0]["date"];

Table::create(array(
    "columns"=>array(
        "apples"=>array(
            "label"=>$date
        )
    )
))
?>
zenon commented on Aug 10, 2017

Hi,

Can the same be done when displaying table data at the footer(top)?

Thanks.

KoolReport commented on Aug 10, 2017

Could you please explain further?

zenon commented on Aug 10, 2017

Example as shown below. From to Table 1 to Table 2,

KoolReport commented on Aug 10, 2017

The first column of Table 2 contains both date and the name of person which make me confuse. A column must have certain type.

zenon commented on Aug 10, 2017

Because instead of displaying 01/01/17 at the table data, I want to display it at the Name column footer. This is to show the total for the 01/01/17.

Is this possible?

Thanks.

KoolReport commented on Aug 10, 2017

I see,

You can do this:

$date = $this->dataStore("name_of_store")->data()[0]["date"];

Table::create(array(
    "showFooter"=>"top",
    "columns"=>array(
        "name"=>array(
            "footerText"=>$date
        ),
        "quantity"=>array(
            "footer"=>"sum",
        )
    )
))
zenon commented on Aug 10, 2017

Thanks.

is it possible to add text in front? Eg: Date: 01/01/2017.

KoolReport commented on Aug 10, 2017

Sure, np

"footerText"=>"Date: ".$date
zenon commented on Aug 10, 2017

I never thought of that. Thank you very much.

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

None