KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.

Hide Column and missing title #1714

Closed Carlo Di Michele opened this topic on on Nov 15 - 5 comments

Carlo Di Michele commented on Nov 15

Hello everybody this is my first post related to my first report so sorry for the dummy question.

This is my code in view.php:

    use \koolreport\widgets\koolphp\Table;

<div class="report-content">
    <div class="text-center">
        <h1>Elenco Prezzi</h1>
        <p class="lead">Elenco prezzi del lavoro Pippo</p>

		/*"excludedColumns"=>array("IDElenco", "ImportoSicurezza"),*/
		"options" => array(
            'columnDefs' => array(
                    'visible' => false,
                    'targets' => [0, 1], // hide the 1st and 2nd columns
        "cssClass"=>array("table"=>"table table-hover table-bordered")

It shows everything with the following problems.


  1. the div report Content is not shown. it shows "$this->dataStore('elenco')"
  2. I've tried to use an array: columns, excludedColumns and columnsDefs but it shows the whole columns in the table.


there is an Error in the debugger (not on the page): "ReferenceError: KoolReport is not defined" Line 654: KoolReport.widget.init.

I suppose that here there is the problem.

datastore: the csv structure (header and first record) is this (fields separated by ";"):

01/04/2020 11.32;1;0;0;1;1;A/1-1;Scavo di sbancamento compreso lo spianamento e la configurazione del f..... eseguito con mezzi meccanici.;Scavo di sbancamento compreso lo spianamento e la configurazione del fondo anche se a gradoni e l'eventuale profilatura di pareti, scarpate e simili, per pavimentazione stradale o simili, il taglio di alberi e cespugli, l'estirpazione di ceppaie, compreso il trasporto nell'ambito del cantiere secondo le indicazioni della Direzione Lavori. Scavo di sbancamento di materie di qualsiasi natura e consistenza, asciutte o bagnate, esclusa la roccia da mina ma compresi i trovanti rocciosi ed i relitti di muratura fino a mc 0.50 eseguito con mezzi meccanici.;mc;4,54;ottomilaottocento;4,54;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;100.00 A;SCAVI;0;0

Thanks for your help. Regards

KoolReport commented on Nov 16

From your report issue, I guess your report does not find its view so it show the debug view (which outputs all dataStores). Please make sure that you have 2 files: MyReport.php and MyReport.view.php. Inside the MyReport.php should have class MyReport extended from KoolReport. Here are sample.

Carlo Di Michele commented on Nov 16

Hello, this is MyReport.php file that contains the class extended:


// Require autoload.php from koolreport library require_once "../../koolreport/core/autoload.php";

//Define the class class ElencoPrezzi extends \koolreport\KoolReport {

use \koolreport\clients\Bootstrap;
protected function settings()
    //Define the "elenco" data source which is the elenco_prezzi.csv 
    return array(

protected function setup()
    //Select the data source then pipe data through various process
    //until it reach the end which is the dataStore named "elenco".


Thanks for your support

Carlo Di Michele commented on Nov 16

Sebastian Morales commented on Nov 16

Carlo, by default without a view parameter KoolReport uses a report class name to guess its view file, in your case it would be ElencoPrezzi.view.php instead of Elenco_prezzi.view.php. Therefore, there're two solutions, either rename your report class, setup and view files to be the same or use a view parameter when you render the report in index.php:


By the way, "columnDefs" option is only available with widget \koolreport\datagrid\DataTables of package Datagrid. For the core widget Table pls check its docs here:



Carlo Di Michele commented on Nov 16

Thaks a lot, it works :-)

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