In my report there is a datatable which is filtered using (1)daterange (2)select input
the select input is posing the error.
1)daterange input is binded with :start, :end input
2)select input is binded with :supervisionName
This is the query in filename.php
select s.name 'Supervision Name',
p.name 'Work Type',
count(1) 'Task Count'
from tablec c, tablepr p, tablesu s where
c.project_id = p.id and
p.project_type = s.code and
p.project_type in (1, 2, 3, 4, 5) and
c.istype = 1
and c.dt_created between :start and :end
".(($this->params["الوحدةالإدارية"]!=array())?"and s.name in :supervisionName":"")."
$sql
group by s.name, p.name
ORDER BY s.code, p.id")->params(array( ":start"=>$this->params["min"],
":end"=>$this->params["max"],":supervisionName"=>$this->params["الوحدةالإدارية"]))
->pipe($this->dataStore('user_details'));
Here only this parameter is causing the error.
$this->params["الوحدةالإدارية"]
Without this input , it seems to be working . In all reports the select input binding is causing problem.
This is my select input in filename.view.php
`
select2::create(array(
"multiple"=>true,
"name"=>"الوحدةالإدارية",
"placeholder"=>"اختر ",
"dataStore"=>$this->src("mysql")->query("select distinct name FROM tables $sql"),
"attributes"=>array(
"class"=>"form-control"
),
));
Please check for the mistake