起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4691|回复: 12

[处理中5] 报表横向的合计

[复制链接]

106

主题

318

帖子

1180

积分

金牌会员

Rank: 6Rank: 6

积分
1180
发表于 2013-8-12 13:49:49 | 显示全部楼层 |阅读模式
本帖最后由 tianhong 于 2013-8-12 14:03 编辑

1.报表横向的合计sum()函数为什么使用不了,一使用就报错图片(tu2)。

2.为什么我给报表添加隐藏列(h-visible:false;)批注后,后台就报错
java.lang.RuntimeException: 计算表达式失败,xpath:false;
        at com.justep.report.TransformContext.a(Unknown Source)
        at com.justep.report.TransformContext.a(Unknown Source)
        at com.justep.report.CompiledTable.calculateXPathValue(Unknown Source)
        at com.justep.report.CompiledCell.getCellValueByRef(Unknown Source)
        at com.justep.report.CompiledCell.compile(Unknown Source)
        at com.justep.report.CompiledCell.compile(Unknown Source)
        at com.justep.report.CompiledSheet.compile(Unknown Source)
        at com.justep.report.CompiledTable.compile(Unknown Source)
        at com.justep.report.Table.transform(Unknown Source)
        at com.justep.report.Content.transform(Unknown Source)
        at com.justep.report.ContentSet.transform(Unknown Source)
        at com.justep.report.Report.a(Unknown Source)
        at com.justep.report.ReportDocument.transform(Unknown Source)
        at com.justep.report.ReportTransformer.transform(Unknown Source)
        at com.justep.report.core.XReportHelper.executeXReport(Unknown Source)
        at com.justep.report.controller.ReportController.execute(Unknown Source)
        at com.justep.report.controller.GenericControllerChain.execute(Unknown Source)
        at com.justep.report.controller.DataController.execute(Unknown Source)
        at com.justep.report.controller.GenericControllerChain.execute(Unknown Source)
        at com.justep.report.controller.InitController.execute(Unknown Source)
        at com.justep.report.controller.GenericControllerChain.execute(Unknown Source)
        at com.justep.report.Servlet.a(Unknown Source)
        at com.justep.report.Servlet.doPost(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.xpath.XPathExpressionException
        at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:383)
        at com.justep.report.TransformContext.a(Unknown Source)
        ... 37 more
Caused by: net.sf.saxon.trans.XPathException: XPath syntax error at char 5 in {false;}:
    Unexpected token ";" beyond end of expression
        at net.sf.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:149)
        at net.sf.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:125)
        at net.sf.saxon.expr.ExpressionParser.parse(ExpressionParser.java:233)
        at net.sf.saxon.expr.ExpressionTool.make(ExpressionTool.java:73)
        at net.sf.saxon.xpath.XPathEvaluator.createExpressionInternal(XPathEvaluator.java:202)
        at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:381)
        ... 38 more

tu3.jpg
tu2.jpg

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2013-8-12 15:34:48 | 显示全部楼层
1.sum这个单元格怎么设置的?加批注了吗?
2.h-visible:false;改为h-visible:false后面不用;如果有多个直接回车就可以
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

106

主题

318

帖子

1180

积分

金牌会员

Rank: 6Rank: 6

积分
1180
 楼主| 发表于 2013-8-12 15:51:36 | 显示全部楼层
=sum(E3:S3)  没有加批注,用的是excel中的合计相加函数
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2013-8-12 16:28:38 | 显示全部楼层
sum(E3+S3)
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

106

主题

318

帖子

1180

积分

金牌会员

Rank: 6Rank: 6

积分
1180
 楼主| 发表于 2013-8-12 17:40:46 | 显示全部楼层
我试了=sum(E3+S3)不行,报错如图tu2
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2013-8-12 17:55:19 | 显示全部楼层
把excel文件发一下
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

106

主题

318

帖子

1180

积分

金牌会员

Rank: 6Rank: 6

积分
1180
 楼主| 发表于 2013-8-13 11:47:38 | 显示全部楼层
这就是那个excel

new_xls.rar

2.02 KB, 下载次数: 718

回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2013-8-13 14:28:19 | 显示全部楼层
=SUM(FW+HTBA)
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

106

主题

318

帖子

1180

积分

金牌会员

Rank: 6Rank: 6

积分
1180
 楼主| 发表于 2013-8-14 14:11:40 | 显示全部楼层
本帖最后由 tianhong 于 2013-8-14 17:14 编辑

上述方法,试用后,还是没起作用
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2013-8-14 17:58:22 | 显示全部楼层
System.out.println(new com.justep.system.transform.Table2Row().transform(table,null).asXML());加到java代码中,把返回的table输出发一下看看
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-4-30 23:03 , Processed in 0.101000 second(s), 25 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表