Use groovy for where in clause for report

Hi,
I’m developing a report with sql query.
I need to pass from java a parameter for where condition with in clause.
I tried to use groovy with this sintax:

and
<% out << (queryAdd != null ? ‘e.item in ( ${queryAdd} )’ : ’ 1=1’)%>

queryAdd is my parameter
I pass in queryAdd : select distinct item from order
The value of queryAdd is setting from java
If I don’t setting this parameter the query running correctly and give me report with items, If i pass queryAdd parameter the sql running but don’t select any record.
I’m sure that in clause select many record and therefor I aspect report with this record and not empty.
What do I wrong?