I'm having problems linking a Query in the repository to a report created in Studio. If I hard-code a SQL query in the JRXML file with <queryString>, I get results displayed in the report when I publish it to the server. However, if I remove the <queryString> element and try to link the report to a Query in the repository (which contains the same SQL string) using the UI, I get no results. Why might this be?
As a possible way round this, is there a way to refer to a Query by its ID in a JRXML file using <queryString>?