KoolReport's Forum

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

Undefined array key Group.php on line 144 #3003

Closed Dorjana Malaj opened this topic on on Feb 28 - 1 comments

Dorjana Malaj commented on Feb 28

im getting the error as below Warning: Undefined array key "ab" in C:\xampp\htdocs\oracle_report\koolreport\core\src\processes\Group.php on line 144 Warning: Undefined array key "all_inv" in C:\xampp\htdocs\oracle_report\koolreport\core\src\processes\Group.php on line 158

the query on Oralce DB is as below

$this->src('fatura')
        ->query("SELECT COUNT(*)     AS all_inv, 
    SUM( CASE ivs_is_einv WHEN 'Y' THEN 1 WHEN 'N' THEN  0 END )   AS all_einv,
    SUM( CASE IVS_IS_ISSUED WHEN 'Y' THEN 1 WHEN 'N' THEN  0 END )   AS sc,
        SUM( CASE WHEN IVS_IS_ISSUED = 'Y' and ivs_is_einvoice='Y' THEN 1 ELSE  0 END )   AS eiSCP,
 to_char(creation_date, 'hh24:mi') AS ab
FROM  inv ivs
where creation_date >= sysdate-0.01
GROUP BY to_char(creation_date, 'hh24:mi')")
       ->pipe(new Group(array(
    "by"=>"ab",
    "sum"=>"all_inv",
)))
		->pipe($this->dataStore('sale_by_month'));
Dorjana Malaj commented on Mar 1

It needed capital Letters for the column names (since the datasource is Oracle database all column names are upper case by default)

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

None