Hi Sebastian
We are currently on 3.5.0 and 5.16.2 dashboard and pro versions respectively.
We get this on various reports so I'll only supply one example.
Below is the board:
<?php
namespace App\Reports\Report;
use App\Reports\Filters\DateRange;
....
use koolreport\dashboard\containers\Html;
use \koolreport\dashboard\Dashboard;
use \koolreport\dashboard\containers\Row;
use \koolreport\dashboard\containers\Panel;
use koolreport\dashboard\inputs\Dropdown;
use \koolreport\dashboard\widgets\Text;
use \koolreport\dashboard\inputs\Button;
use \koolreport\dashboard\Client;
class QAQuestionsAdherenceBoard extends Dashboard
{
protected function widgets()
{
return [
Button::create()->text("Back")->onClick(function(){
return Client::dashboard("Board")->load();
}),
Row::create([
Panel::create()
->header("<b>Filters</b>")
->width(3/3)
->sub([
Row::create([
[
Text::create()->text("<label><strong>Date</strong></label>")->asHtml(true),
DateRange::create(),
],
]),
])
Row::create([
ReportTable::create()
])->width(2/2),
]),
];
}
}
Below is the report:
<?php
namespace App\Reports\Report;
use koolreport\dashboard\fields\Text;
use \koolreport\dashboard\widgets\KWidget;
use Illuminate\Support\Facades\DB;
use \App\Reports\AutoMaker;
class QAQuestionsAdherenceTable extends KWidget
{
protected function dataSource()
{
$dateRange = $this->sibling("DateRange")->value();
return AutoMaker::rawSQL
("
SELECT....
");
}
protected function onCreated()
{
$this
->use(\koolreport\datagrid\DataTables::class)
->settings([
"fastRender" => true,
"plugins" => ["Buttons"],
"options"=>[
"order"=> [
[0, 'asc'],
[1, 'desc'],
],
],
"columnDefs"=>[array(
"visible"=> true,
"targets"=>0,
),],
"searching"=>true,
"colReorder"=>true,
"fixedHeader"=>false,
"responsive"=> true,
"select"=>true,
"paging"=>true,
"autoWidth" => false,
],
"showFooter" => true,
"columns"=>array(
"Column1"=>array(
"footerText"=>"<b>Total</b>"
)
....,
},
"paging"=>array(
"pageSize"=>10,
),
"cssClass"=>array(
"table"=>"table table-hover table-grey",
"th"=>"table-header-grey"
),
]);
}
protected function fields()
{
return [
Text::create("Column1"),
.....
];
}
public function dataView()
{
$dataView = parent::dataView();
$fields = $this->fields();
return $dataView
->fields($fields);
}
}