KoolReport's Forum

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

Occasionally DataStore doesn't contain data #1627

Closed mclovin opened this topic on on Sep 23, 2020 - 3 comments

mclovin commented on Sep 23, 2020

Report.php

$this->src('sqlConn')->query("select * from Ways")
->pipe($this->dataStore('ways'));
$this->src('sqlConn')
->query($varname1 . $varname11 . $varname12 . $varname13 . $varname14 . $varname140 . $varname141 . $varname15 . 
$varname16 . $varname160 . $varname161 . $varname17)
->pipe($this->dataStore('archiveStore'));

Report.view.php

$array1 = $this->dataStore('ways')->data();
$array = $this->dataStore('archiveStore')->data();

archiveStore always returns data. ways dataStore not always (broadly speaking - nine times out of ten). archiveStore gets data from linked OLEDB server, ways gets data from a real table in SQL Server. The table always contains a static set of data.

David Winterburn commented on Sep 24, 2020

Which data source class did you use, is it SQLSRVDataSource or PdoDataSource? In either case, please open the file, go to function start(), put in some echo, print command after query statement prepare/execute to see its result. Let us know if you have any difficulty. Thanks!

mclovin commented on Sep 24, 2020

Hello David! Thank you for quick reply. I am using PdoDataSource.

print_r in PdoDataSource.php

if ways datastore contains data, print_r returns this

if ways datastore contains nothing, print_r returns nothing. But archiveStore returns data.

David Winterburn commented on Sep 25, 2020

Would you please post your full report's php setup code? Thanks!

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