2001 JI Open Discussion Posted August 14, 2006 Share Posted August 14, 2006 By: Subu - subu1 Multiple SQL 2002-06-13 08:44Hi , Is it possible to have more than one Select statement in the XML design file. If not , is it possible to define cursors. Thanks Subu By: Teodor Danciu - teodord RE: Multiple SQL 2002-06-13 08:53 Hi, What do you mean by multiple Select statements? Something like this? SELECT * FROM a WHERE a.id IN (SELECT id FROM b) Yes, this is possible. JasperReports uses a PreparedStatement behind the scenes, so everything that is possible with a JDBC PreparedStatement object, is also possible in JasperReports. Cursors are database server objects and have nothing to do with the Java layer. I think what you need is to create a stored procedure in your database and call it in the report query, if you have to make some sort of data preparations for the report. Thank you, Teodor By: Subu - subu1 RE: Multiple SQL 2002-06-13 09:24What i mean was can have 2 separate Select statement like select custno , address_id from customer and the other like select address_1 from address which mean 2 separate sql statement By: Teodor Danciu - teodord RE2: Multiple SQL 2002-06-13 23:46 Hi, No, you can have only one SELECT per report. However, if you want to output 2 different result sets in your document, you can use subreports. There is a sample provided. Good luck! 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