KoolReport's Forum

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

Pivot SQL - Error #2032

Open Carlos Eduardo Luminatti opened this topic on on Apr 17, 2021 - 4 comments

Carlos Eduardo Luminatti commented on Apr 17, 2021

Hi Guys, how are you ?

Why i´m heaving this Problem ?

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) in C:\Program Files\NetMake\v9-php73\wwwroot\koolreport_pro-5.0.4\koolreport\core\src\datasources\PdoDataSource.php:114 Stack trace: #0 C:\Program Files\NetMake\v9-php73\wwwroot\koolreport_pro-5.0.4\koolreport\core\src\datasources\PdoDataSource.php(114): PDO->__construct('mysql:host=loca...', 'root', '', NULL) #1 C:\Program Files\NetMake\v9-php73\wwwroot\koolreport_pro-5.0.4\koolreport\core\src\core\DataSource.php(57): koolreport\datasources\PdoDataSource->onInit() #2 C:\Program Files\NetMake\v9-php73\wwwroot\koolreport_pro-5.0.4\koolreport\core\src\KoolReport.php(264): koolreport\core\DataSource->__construct(Array, Object(CustomersYears)) #3 C:\Program Files\NetMake\v9-php73\wwwroot\koolreport_pro-5.0.4\examples\reports\pivot\pivotsql\CustomersYears.php(22): koolreport\KoolReport->src('automaker') #4 C:\Program Files\NetMake\v9-php73\wwwroot\koolreport_pro-5.0.4\koolreport\core\src\KoolReport.php(100) in C:\Program Files\NetMake\v9-php73\wwwroot\koolreport_pro-5.0.4\koolreport\core\src\datasources\PdoDataSource.php on line 114 

In the Online version, this example has an error as well. I look forward to a return, thanks.

KoolReport commented on Apr 17, 2021

I have viewed the code of example, the example was trying to use local db which it should not (this happens during our example development and developer use local db for faster data query and forgot to change back), it should connect to our public db. The settings should be:

public function settings()
{
        $config = include "../../../config.php";

        return array(
            "dataSources"=>array(
                "automaker"=>$config["automaker"]
            )
        );
}

We will fix the example.

Please let us know if the issue still persists.

Carlos Eduardo Luminatti commented on Apr 17, 2021

Hello friends, how are you ? Are there any examples of using the Matrix Pivot Table with MariaDB?

Carlos Eduardo Luminatti commented on Apr 18, 2021

Sorry...

Sorry, I found an example here in the connections ...

I can switch to localhost smoothly, correct?

KoolReport commented on Apr 19, 2021

Yes, you can use the config.php to change connection of all examples to your local db.

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
bug

Pivot