I am using mysql to write a script and get the parameter from jasper. My sample as below: select xxxxx from abc WHERE if((($P{paymentTypes}) = '' , 1=1,payment_method_type_id in ($P!{paymentTypes})) This mean that. If i detect the paymentTypes parameter = '', then select all rows out. Otherwise the paymentTypes must be in payment_method_type_id The 2nd option is correct. But when detect '', it cannot show all rows out. It just give a blank page in the report. What should i do for this?