When you want to use any parameter in SQL you will need to use $P!{myParam}. This tells jasper to explicitly insert the value of the parameter into the SQL string. If you wanted to pass a parameter and use it in your where clause then you would need to put the $P!{myPARAM} insides quotes.