KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.

Export to excel simply does not work at all, no data #1081

Closed Sergio de Sousa opened this topic on on Sep 11, 2019 - 3 comments

Sergio de Sousa commented on Sep 11, 2019

I get absolutely no data when exporting the simplest table:

Table::create(array(
                    "dataSource"=>$this->dataStore('demographics'),
                    
                ));

My setup() is like this:

public function setup() {

    	$query0 = "select * from ".$this->db_prefix."_POSTALS";

        $this->src('database')
        ->query("select * from ".$this->db_prefix."_POSTALS")
        ->pipe($this->dataStore('demographics'));

    }

The db_prefix is set in constructor, like this:

    function __construct($init_prefix) {

        $this->db_prefix = $init_prefix;

    }

Can you please help? Thank you

Sergio de Sousa commented on Sep 12, 2019

I am new with KoolReport, how can I get support, what's the right way to contact for support? Thank you.

KoolReport commented on Sep 12, 2019

Hi Sergio,

Could you please show me the export to excel part?

Also, don't overwrite the __constructor() method.

You can do:

$report = new MyReport([
    "db_prefix"=>"tbl"
]);

and then in the setup() function you can do:

$query0 = "select * from ".$this->params["db_prefix"]."_POSTALS";
Sergio de Sousa commented on Sep 13, 2019

Excellent, problem solved. Thank you!

I also have another question but I'll post it separately. Thank you again.

KoolReport Is Free and Open-Source!

KoolReport is a professional php reporting framework which saves you tons of time to construct dynamic data report & dashboard.

  • Connect to various datasources such as MySQL, SQL Server, MongoDB or even from CSV or Excel file.
  • Contain series of powerful built-in data processes for your data manipulation.
  • Generate stunning charts and graphs to help you communicate data insights to your audiences effectively.
  • Integrate seamlessly with any php frameworks such as Laravel, CodeIgniter, Symfony.
Download Now and register our tutorials to get started!

Download KoolReport
help needed

Excel