Hi Anubha, I found the below which might be helpful for you IN and NOTIN ClausesJasperReports provides a special syntax to use with a where condition: the clause IN and NOTIN. The clause is used to check whether a particular value is present in a discrete set of values. Here is an example: SELECT * FROM ORDERS WHERE SHIPCOUNTRY IS IN ('USA','Italy','Germany') The set here is defined by the countries USA, Italy and Germany. Assuming we are passing the set of countries in a list (or better a java.util.Collection) or in an array, the syntax to make the previous query dynamic in reference to the set of countries is: SELECT * FROM ORDERS WHERE $X{IN, SHIPCOUNTRY, myCountries} where myCountries is the name of the parameter that contains the set of country names. The $X{} clause recognizes three parameters: •Type of function to apply (IN or NOTIN) •Field name to be evaluated •Parameter nameJasperReports handles special characters in each value. If the parameter is null or contains an empty list, meaning no value has been set for the parameter, the entire $X{} clause is evaluated as the always true statement “0 = 0”. Source: http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-us... Using this, you can place the whole condition within a conditional parameter like; $P{XYZ} ==1 ? $X{IN, ... , ....} : $X{NOTIN, ... , ...} ; Regards Luke