I have a report, that uses parameters to define a user controlled group by statement. Depending on choices the user makes in the input controls certain fields are added to the query. I use non-prompted parameters to create this group by statement like: $P{p_gr_month} ? "apa.\"MONTH\"" : "null" So if p_gr_month is true, it will add apa.MONTH to the select of the query, otherwise it will add null instead. For the group by part it does something simular: $P{p_gr_month} ? ",apa.\"MONTH\"" : "" Now it does all work in iReport, and as an Report in JasperServer. But when I wish to use this in adhoc mode as a topic, it gives a compilation error saying that there is an invalid AssignmentOperator on token "MONTH". I think this is because the query in adhoc mode shows this as the value in the parameter ("GROUP BY apa."MONTH" "); I think it tries to parse month as a value or parameter, but I need to double quote month because of the postgresql setup we have here, and as I said it works in iReport as well as in JasperServer as a report, just not in adhoc mode as a topic. Any ideas on what i'm doing wrong here ? Regards, Peter