报表知识库
我要提问

单元格调用存储过程问题

单元格中调用存储过程,在设计器预览正常,服务器连接数据源正常,但是在web预览报错:
[2008-08-29 15:14:42] runqianReportLogger : [DEBUG] – 现在计算报表test/调用存储过程.raq
[2008-08-29 15:14:42] runqianReportLogger : [INFO ] – CacheManager get report entry
[2008-08-29 15:14:42] runqianReportLogger : [INFO ] – 开始运算报表,首先取数……
[2008-08-29 15:14:43] runqianReportLogger : [DEBUG] – 下面开始打出sql
[2008-08-29 15:14:43] runqianReportLogger : [DEBUG] – ds1={call RQ_TEST_CUR(?,?)}
[2008-08-29 15:14:43] runqianReportLogger : [INFO ] – 取数结束,开始运算
Try to load from: /config/customFunctions.properties
[2008-08-29 15:14:46] runqianReportLogger : [ERROR] – error:
单元格A3中有错误: Unexpected token: RQ_TEST_CUR in statement [ call RQ_TEST_CUR(?,?) ]
错误来源:Unexpected token: RQ_TEST_CUR in statement [ call RQ_TEST_CUR(?,?) ]
 at com.runqian.report4.model.expression.function.Call.calculate(Unknown Source:120)
 at com.runqian.report4.model.expression.Function.optimize(Unknown Source:82)
 at com.runqian.report4.model.expression.Expression.optimize(Unknown Source:554)
 at com.runqian.report4.model.engine.ExtNormalCell.checkExtend(Unknown Source:632)
 at com.runqian.report4.model.engine.ExtCellSet.prepareCalculate(Unknown Source:1241)
 at com.runqian.report4.model.engine.ExtCellSet._$1(Unknown Source:2127)
 at com.runqian.report4.model.engine.ExtCellSet.calculate(Unknown Source:2118)
 at com.runqian.report4.usermodel.Engine.calc(Unknown Source:115)
 at com.runqian.report4.cache.lIlIIIIlIIIIlIlI.getReport(Unknown Source:118)
 at com.runqian.report4.tag.HtmlTag.doStartTag(Unknown Source:275)
 at org.apache.jsp.jsp.test.diaoyongcunchuguocheng_jsp._jspx_meth_report_html_0(diaoyongcunchuguocheng_jsp.java:89)
 at org.apache.jsp.jsp.test.diaoyongcunchuguocheng_jsp._jspService(diaoyongcunchuguocheng_jsp.java:61)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
 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:802)
 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:118)
 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:799)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Unexpected token: RQ_TEST_CUR in statement [ call RQ_TEST_CUR(?,?) ]
 at org.hsqldb.jdbc.Util.throwError(Unknown Source)
 at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source)
 at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
 at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:185)
 at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:278)
 at com.runqian.report4.model.expression.function.Call.calculate(Unknown Source:68)
 … 41 more
        错误原因:reportconfig.xml中配置了多个数据源,oracle数据源没有放在第一个
        解决方法:1、将reportConfig.xml中oracle数据源的配置放到第一个
                            2、用call2()调用存储过程,指定数据源。