Jump to content
Changes to the Jaspersoft community edition download ×

Jasper Report using Stored Procedure


Recommended Posts

By: RommelRamos - rommel10

Jasper Report using Stored Procedure

2006-05-04 14:02

I am using Jasper Report with Stored Procedure, it's loading when i start using IDE IReport, but when i try to use it in my web application occurs a error, somebody know if have something that i must to do?

'sp_psu_req_mat_reopcao' is my stored procedure

 

========================================

JasperReports encountered this error :

java.sql.SQLException: Line 1: Incorrect syntax near 'sp_psu_req_mat_reopcao'.

at net.sourceforge.jtds.jdbc.SqlMessage.toSQLException(Unknown Source)

at net.sourceforge.jtds.jdbc.SQLWarningChain.addOrReturn(Unknown Source)

at net.sourceforge.jtds.jdbc.Tds.submitProcedure(Unknown Source)

at net.sourceforge.jtds.jdbc.PreparedStatement_base.submitProcedure(Unknown Source)

at net.sourceforge.jtds.jdbc.PreparedStatement_base.execute(Unknown Source)

at net.sourceforge.jtds.jdbc.PreparedStatement_base.executeQuery(Unknown Source)

at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:115)

at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:632)

at net.sf.jasperreports.engine.fill.JRFillDataset.setDatasource(JRFillDataset.java:576)

at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:565)

at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:874)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:689)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:647)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)

at net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:203)

at org.apache.jsp.jsp.pdf_jsp._jspService(pdf_jsp.java:66)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)

at java.lang.Thread.run(Thread.java:595)

 

NESTED BY :

net.sf.jasperreports.engine.JRException: Error executing SQL statement for : rel

at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:121)

at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:632)

at net.sf.jasperreports.engine.fill.JRFillDataset.setDatasource(JRFillDataset.java:576)

at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:565)

at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:874)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:689)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:647)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)

at net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:203)

at org.apache.jsp.jsp.pdf_jsp._jspService(pdf_jsp.java:66)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)

at java.lang.Thread.run(Thread.java:595)

Caused by: java.sql.SQLException: Line 1: Incorrect syntax near 'sp_psu_req_mat_reopcao'.

at net.sourceforge.jtds.jdbc.SqlMessage.toSQLException(Unknown Source)

at net.sourceforge.jtds.jdbc.SQLWarningChain.addOrReturn(Unknown Source)

at net.sourceforge.jtds.jdbc.Tds.submitProcedure(Unknown Source)

at net.sourceforge.jtds.jdbc.PreparedStatement_base.submitProcedure(Unknown Source)

at net.sourceforge.jtds.jdbc.PreparedStatement_base.execute(Unknown Source)

at net.sourceforge.jtds.jdbc.PreparedStatement_base.executeQuery(Unknown Source)

at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:115)

... 41 more

 

 

========================================

 

 

 

 

 

 

By: Lalith - weeralalith

RE: Jasper Report using Stored Procedure

2006-05-05 08:20

http://sourceforge.net/forum/message.php?msg_id=3632480

 

Hope this may usefull,

Lalith

 

 

 

 

By: RommelRamos - rommel10

RE: Jasper Report using Stored Procedure

2006-05-08 07:48

Thanks, but i changed a class into Jasper.jar, I changed PreparedStatement to PreparedCall, i make a control to see if i have Stored or query. After i will send it for sourceForge.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...