Try to use below in your expression: "select q.id as q_id, w.document_id, dt.id as dt_id, dep.d_name, q.q_name, dt.dt_name, CONVERT(varchar(10), w.wf_datein, 101) as wf_datein, CONVERT(varchar(10), w.wf_dateout, 101) as wf_dateout from workflow w inner join queue q on w.queue_id = q.id inner join document d on w.document_id = d.id inner join doctype dt on d.doc_type_id = dt.id inner join department dep on dt.department_id = dep.id where wf_dateout between "+$P{startDate}+" and "+$P{endDate}+" and $X{IN, dt.id, doctypeId} and $X{IN,q.id, queueId} and dt.department_id = "+$P{departmentId}