I think this would be a reall usefull feature to add. Looking in JRDesignQuery.java there is currently no handling for $V substitution. Here is a simple example. The client application printing the report has no knowledge of SQL, just testid's. It passes a testid to the report as a parameter. If this is not zero, I want to build a complicated WHERE clause using subselects etc, and store it in a local variable. I could then use this report query... If testID = 0, filter = "" If testID != 0, filter = "WHERE testid NOT IN (complicated sub select ) " So you could now have the query string: SELECT surname FROM members $V{filter} ORDER BY surname Is there any way round this?