2001 JI Open Discussion Posted August 17, 2006 Share Posted August 17, 2006 By: arun - arun4v Full query as parameter?URGENT 2002-11-11 01:53Hello, I am trying to pass my full query as parameter but its not working. I am getting - java.sql.SQLException: ERROR: parser: parse error at or near "'" If same query I put in the <queryString> tag of XML file , it works fine. Is it possible to pass full query as parmeter. Any kind of help will be appericated. Thanks and Regards arun By: Axel Hallez - ahallez RE: Full query as parameter?URGENT 2002-11-11 02:00Hello Arun, I suggest that you execute the query in your own code, then pass the resultset to a JRResultSetDataSource constructor and use this datasource object to generate the report. Hope this helps, Axel By: Lecio Nunes - lnunes RE: Full query as parameter?URGENT 2002-11-11 04:35Hi Arun, you can still use the SQL statement as a parameter, only put a '!' symbol near $P: <parameter name="sql" class="java.lang.String" /> <queryString><![CDATA[$P!{sql}]]></queryString> Best regards Lecio By: Teodor Danciu - teodord RE: Full query as parameter?URGENT 2002-11-11 13:22 Hi, This should work without problems. Have you used the correct $P!{} syntax? And if so, make sure you don't have the SQL query placed between quotes or apostrophes. Thank you, Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now