KoolReport's Forum

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

How to Add an Extra Data Row #2340

Closed hsw opened this topic on on Sep 16, 2021 - 1 comments

hsw commented on Sep 16, 2021

Hi,

My report is getting data from CSV. After filtering and piping through the processes. the data goes through the Transpose() process and output to DataStore.

I need to add 1 new data row (which is created on the fly), to go though the process and output to the DataStore together with the rest of the data (from CSV datasource).

After Transpose(), the new row must appear in column c1. I tried different ways but not successful. May be someone can point me to the right direction.

Example:

    protected function setup()
    {
        $newrow=array(....);

        $this->src('csvdata')
        ......
        ->saveTo($temp);

        $temp->pipe(new Transpose())
        	->pipe($this->dataStore('result'));

Thank you.

hsw commented on Sep 17, 2021

Hi,

I managed to find a solution. I output the data row to a csv file, which I treat as second csv datasource.

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
None yet

None