帆软报表在本地运行没问题,放到Tomcat服务器上之后就报错。

错误代码:1301 数据集配置错误Query:ORA-01722: invalid number

select T1.TDDOC,
       T1.tddsc1,
       t1.tddsc2,
       t1.tddsc,
       t1.uorg,
       t1.tuprc,
       t1.taexp,
       t1.THDC5801,
       t1.tddoco,
       t1.thflag,
       t1.tdtxa1,
       t1.tdflag,
       t1.THSTRING01,
       t2.tdtxa2,
       t3.mcu,
       trim(c.abalph) as abalph,
       t1.thalph
  from (select trim(t1.tddoc) as tddoc,
               trim(t1.tddsc1) AS tddsc1,
               trim(t1.tddsc2) as tddsc2,
               trim(t1.tddsc) as tddsc,
               T1.TDUORG / 10000 as uorg,
               T1.TDTUPRC / 10000 as tuprc,
               T1.TDTAEXP / 100 as taexp,
               trim(T.THDC5801) as THDC5801,
               t1.tddoco,
               t.thflag,
               t1.tdtxa1,
               trim(t.thalph) as thalph,
               t1.tdflag,
               T.THSTRING01
          from proddta.f5842001 t
          left join proddta.f5842002 t1
            on t.thdoc = t1.tddoc
         where tdchar01 <> 'N'
        
        ) t1
  left join (select tddoc,
                    listagg(to_char(tdtxa1), ' ') WITHIN GROUP(ORDER BY tdtxa1) AS tdtxa2
               from (select distinct tddoc,
                                     concat(SUBSTR(trIM(tdtxa1), 2, 2), '%') as tdtxa1
                       from proddta.f5842002)
              group by tddoc) t2
    on t1.tddoc = t2.tddoc
  left join (select tddoc,
                    listagg(to_char(tdmcu), ' ') WITHIN GROUP(ORDER BY tdmcu) AS mcu
               from (select distinct tddoc, trIM(tdmcu) as tdmcu
                       from proddta.f5842002)
              group by tddoc) t3
    on t1.tddoc = t3.tddoc
  left join sy920.f0092 b
    on T1.thstring01 = b.uluser
  left join proddta.f0101 c
    on b.ulan8 = c.aban8
 order by t1.tddoc, t1.tdtxa1
thstring01 是nchar(30) uluser是nchar(10)

不知道是怎么回事,在线等挺急的。

语句本身没有问题。是用于条件筛选的语句导致的。用了to_number也报数字无效。

and 1=1 ${if(len(单据号)==0,"","and T.tHdoc=to_number('"+单据号+"')")}
and 1=1 ${if(len(单据号上)==0,"","and t.tHdoc>to_number('"+单据号上+"')")}
and 1=1 ${if(len(单据号下)==0,"","and t.tHdoc<to_number('"+单据号下+"')")}


FineReport 刘周磊 发布于 2020-1-10 11:24 (编辑于 2020-1-10 14:51)
1min目标场景问卷 立即参与
回答问题
悬赏:4 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
1
873282620Lv3初级互助
发布于2020-1-10 11:39(编辑于 2020-1-10 11:40)

你这个好像是sql的错误,不关帆软平台错,能给个报错截图吗?看看具体位置

  • 刘周磊 刘周磊(提问者) 这是唯一的报错信息,在数据库执行不报错,本地不报错,放到TOMCAT服务器上就开始报错的。 java.lang.RuntimeException: 错误代码:1301 数据集配置错误Query:ORA-01722: invalid number at com.fr.report.core.A.J.dealWithBEDSColumn(Unknown Source) at com.fr.report.core.A.n.cc_ce_array(Unknown Source) at com.fr.report.core.A.J.A(Unknown Source) at com.fr.report.core.A.J.A(Unknown Source) at com.fr.report.core.A.J.A(Unknown Source) at com.fr.report.core.A.J.A(Unknown Source) at com.fr.report.core.A.J.A(Unknown Source) at com.fr.report.core.A.J.A(Unknown Source) at com.fr.report.core.A.J.A(Unknown Source) at com.fr.report.core.A.J.C(Unknown Source) at com.fr.report.core.A.J.execute4Expand(Unknown Source) at com.fr.report.core.A.J.execute(Unknown Source) at com.fr.report.worksheet.WorkSheet.execute(Unknown Source) at com.fr.report.core.sheet.AbstractWorkBookExecutor._execute(Unknown Source) at com.fr.report.core.sheet.AbstractWorkBookExecutor.execute(Unknown Source) at com.fr.main.impl.WorkBook.execute(Unknown Source) at com.fr.log.LogUtils.executeAndLogRecord(Unknown Source) at com.fr.log.LogUtils.executeAndLogRecord(Unknown Source) at com.fr.web.cache.ReportCache.getResultWorkBook(Unknown Source) at com.fr.stable.PageActor.getResultBookFromCacheIfNeed(Unknown Source) at com.fr.main.impl.WorkBookTemplateDelegate.execute(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.calResultWorkBook(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.initBook2Show(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.getWorkBook2Show(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.getResultWorkBook(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.createPageSetChain(Unknown Source) at com.fr.web.core.ReportSessionIDInfor.getReportPage(Unknown Source) at com.fr.web.core.A.FC.A(Unknown Source) at com.fr.web.core.A.FC.A(Unknown Source) at com.fr.web.core.A.tB.A(Unknown Source) at com.fr.web.core.A.HB.actionCMD(Unknown Source) at com.fr.web.core.WebActionsDispatcher.dealForActionCMD(Unknown Source) at com.fr.web.core.WebActionsDispatcher.dealForActionDefaultCmd(Unknown Source) at com.fr.web.core.A.qB.process(Unknown Source) at com.fr.web.core.ReportDispatcher.dealWithOp(Unknown Source) at com.fr.web.core.ReportDispatcher.dealWeblet(Unknown Source) at com.fr.web.core.ReportDispatcher.dealWithRequest(Unknown Source) at com.fr.web.BaseServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2500) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2489) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)Caused by: com.fr.general.data.TableDataException: 错误代码:1301 数据集配置错误Query:ORA-01722: invalid number at com.fr.data.impl.AbstractDBDataModel.initConnectionAndResultAndCheckInColumns(Unknown Source) at com.fr.data.impl.AbstractDBDataModel.getColumnCount(Unknown Source) at com.fr.data.index.AbstractIndexDataModel.getColumnCount(Unknown Source) ... 61 moreCaused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:30) at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:762) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1309) at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:422) at com.fr.third.org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at com.fr.third.org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at com.fr.data.core.db.dialect.AbstractDialect.executeQuery(Unknown Source) ... 64 more
    2020-01-10 12:48 
最佳回答
1
540922194Lv6见习互助
发布于2020-1-10 11:50

sql 的问题,现在数据库里执行下,

最佳回答
1
黄源Lv6中级互助
发布于2020-1-10 11:50(编辑于 2020-1-10 11:53)

无效数字,排查下你的计算和有转换的位置


估计在这个位置  

T1.TDUORG / 10000 as uorg,
               T1.TDTUPRC / 10000 as tuprc,
               T1.TDTAEXP / 100 as taexp,


  • 4关注人数
  • 944浏览人数
  • 最后回答于:2020-1-10 14:51
    请选择关闭问题的原因
    确定 取消
    返回顶部