I tried to define a parameter and tried to use that parameter in the "querytext" sql using $P!{} but I am unable to filter the data when I use it in the query text. How can i filter the data .. sqlpart ="(($P{lobTC} == null) ? "" : " and ba.ins_lob_tc in (" + $P{lobTC} + ") " ) " querytext = select * from ba where $P!{sqlPart} When the query getting executed I am not able to filter the data based on the condition mentioned in the sqlPart. The result is bringing me all set of data... i.e. Select * from ba Any help or suggestions in this regards is really appreciated.