ubergeekcd Posted August 12, 2006 Share Posted August 12, 2006 Hello All, I need to execute oracle stored procedures from within jasperreports, how do I go about achieving this functionality. Please advise. I just read a post that said the oracle stored procs were implemented Thanks All... Link to comment Share on other sites More sharing options...
Teodor Danciu Posted August 21, 2006 Share Posted August 21, 2006 Hi, There is nothing special you need to do to use a stored procedure call in the <queryString> tag of JRXML as long as that stored procedure does not have OUT parameters and returns a ResultSet.This means that the stored procedure can be executed through a PreparedStatement in JDBC.If your stored procedure does not comply with these, then it must be called through CallableStatement in JDBC and JasperReports does not know how to handle this by default. And you probably need to call that stored procedure in you application and pass the data as a JRDataSource to the engine. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
bklawans Posted August 22, 2006 Share Posted August 22, 2006 I have a sample implementation of a JR query executer that support Oracle stored procedures with REF CURSORs. I'll dig up the code and post it on JasperForge sometime today. -Barry Link to comment Share on other sites More sharing options...
bklawans Posted August 24, 2006 Share Posted August 24, 2006 The code is up. There is now a public project in the Developer Forge section of this site called OracleStoredProcedures that has all the code you need. Have fun! -Barry 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