KoolReport's Forum

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

DB query builder error #803

Open Keerthiga opened this topic on on Apr 15, 2019 - 1 comments

Keerthiga commented on Apr 15, 2019

I have used \koolreport\querybuilder\DB to get the result using join query.

and i have the following error like,

SalesList cannot use koolreport\querybuilder\DB - it is not a trait in C:\xampp\htdocs\proj\application\views\admin\reports\SalesList.php on line 8

my code is

$ci = get_instance();

    $session_data = $ci->session->userdata('logged_in');
    $user_id= $session_data['user_id'];
    $this->src("alljobs")
    ->query(
        DB::table("nrm_doc_header")
    ->join("nrm_business",'nrm_doc_header.business_id','=','nrm_business.business_id')
    ->select(
    'nrm_doc_header.created_date',
    'nrm_doc_header.invoice_number',
    'nrm_business.business_name'
    ))
    ->pipe($this->dataStore('saleslist'));
KoolReport commented on Apr 15, 2019

Please move the use \koolreport\querybuilder\DB out of the SalesList class. It should be on top of the class. Please have a look at our example.

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
help needed

CodeIgniter