I want to do a query for all projects with a given string in their project number. I am doing a query on MS SQL Server The a query that works very well has: WHERE projnum LIKE "%PAD%" This gives me all projects with PAD in the name OK, but of course I want the users to be able to pick a string. I want to prompt the user for that string and put it nto a parameter: $P{PN} So my SQL statement in iReport is: WHERE projnum LIKE "%" + $P{PN} +"%" This returns nothing. No error, just didn't find any records. What is really annoying, is if I use the copy to clipboard button in the Report Query window in iReport and past it into dbVisualizer I get: WHERE projnum LIKE "%" + 'PAD' +"%" And that query works in dbVisualizer. I'll admit, I don't know java well at all. Is there some way to escape or double quote or something so that JasperReport makes the right query? I've also tried setting $P{PN} to "%PAD%" Same behavior. A related question: how do I see what the actual query is that gets sent to my database whe I run it? Thanks!