KoolReport's Forum

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

Koolreport datatables remove first row of element as default header #1319

Open ankit raj opened this topic on on Feb 26, 2020 - 2 comments

ankit raj commented on Feb 26, 2020

return array(

        "dataSources"=>array(
            "data"=>array(
                "class"=>'\koolreport\datasources\ArrayDataSource',
                "dataFormat"=>"table",
                "data"=>array(
                    array("name","age","income"),
                    array("John",26,50000),
                    array("Marry",29,60000),
                    array("Peter",34,100000),
                    array("Donald",28,80000),
                )
            )
        )

Hello , as in the afforementioned example, the first row is always passed as header even when i am passing headers explicitly. Is there any way to stop that behavior? because i only want my table body elements to be passed as an array.

KoolReport commented on Feb 26, 2020

The dataFormat is set to table so the data must be above. The first row must be the array of column name. Or you can associate dataFormat in which look like this:

"dataFormat"=>"associate",
"data"=>array(
    array("name"=>"John","age"=>25,"income"=>5000)
    ...
)
ankit raj commented on Feb 26, 2020

I have an elaborate table with repeated column names under a different header.Like India and International both headers have a subheader with column new in it. since its a key value pair , it thinks the next new is duplicate. how do i get rid of this issue?

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