KoolReport's Forum

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

KoolReport class not found #1047

Open Atif opened this topic on on Aug 16, 2019 - 3 comments

Atif commented on Aug 16, 2019

I like to use KoolReport in CodeIgniter. My KoolReport folder is in application/libraries/ folder. My class for reporting "MyReport" is in application/controller/admin and it is extending the KoolReport class in the folder application/libraries/koolreport/core/src/. But I am getting class not found error.

Fatal error: Class 'KoolReport' not found in D:\wamp64\www\prism_koolreport\application\reports\MyReport.php on line 14.

Snapshot of my reporting class

<?php

require APPPATH."libraries/koolreport/autoload.php";

class MyReport extends KoolReport
{
    use \koolreport\clients\Bootstrap;
    function settings()
    {
        return array(
            "assets"=>array(
                "path"=>"../../assets",
                "url"=>"assets",
            ),
            "dataSources"=>array(
                "automaker"=>array(
                    "connectionString"=>"mysql:host=localhost;dbname=automaker",
                    "username"=>"root",
                    "password"=>"",
                    "charset"=>"utf8"
                )
            )
        );
    }
KoolReport commented on Aug 16, 2019

Please do:

class MyReport extends \koolreport\KoolReport
Atif commented on Aug 16, 2019

I have made your suggested changes i.e.

class MyReport extends \koolreport\KoolReport

still facing the same problem

KoolReport commented on Aug 16, 2019

It seems to me that the koolreport is not loaded. May be you can try:

require_once APPPATH."/libraries/koolreport/core/autoload.php";

I added a "/" in front of libraries

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