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

QQ登录

只需一步,快速开始

查看: 5008|回复: 6

[结贴] 甘特图

[复制链接]

197

主题

834

帖子

1511

积分

金牌会员

Rank: 6Rank: 6

积分
1511
QQ
发表于 2018-3-13 13:47:55 | 显示全部楼层 |阅读模式
用的是report数据源查询数据 日期格式查询出来是yyyy-MM-dd 00:00:00是因为格式的问题吗
java.text.ParseException: Unparseable date: ""
        at java.text.DateFormat.parse(DateFormat.java:366)
        at com.justep.chart.data.ChartDatasetHelper.toDate(Unknown Source)
        at com.justep.chart.data.ChartDatasetHelper.createGanttDataSet(Unknown Source)
        at com.justep.chart.data.ChartDatasetHelper.createDataSet(Unknown Source)
        at com.justep.chart.BuildChart.initChartObj(Unknown Source)
        at com.justep.chart.BuildChart.initChartObj(Unknown Source)
        at com.justep.chart.BuildChart.build(Unknown Source)
        at com.justep.chart.BuildChart.createChart(Unknown Source)
        at com.justep.chart.JustepChartHelper.executeChart(Unknown Source)
        at com.justep.report.core.XReportChartHelper.executeChart(Unknown Source)
        at com.justep.report.core.XReportHelper.a(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:643)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        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:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)
[ERROR] 2018-03-13 11:53:21,092 com.justep.report.controller.ReportController - 报表执行失败
null
com.justep.report.exception.ReportServerException
        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:643)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        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:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
        at org.jfree.data.time.SimpleTimePeriod.<init>(SimpleTimePeriod.java:86)
        at com.justep.chart.data.ChartDatasetHelper.createGanttDataSet(Unknown Source)
        at com.justep.chart.data.ChartDatasetHelper.createDataSet(Unknown Source)
        at com.justep.chart.BuildChart.initChartObj(Unknown Source)
        at com.justep.chart.BuildChart.initChartObj(Unknown Source)
        at com.justep.chart.BuildChart.build(Unknown Source)
        at com.justep.chart.BuildChart.createChart(Unknown Source)
        at com.justep.chart.JustepChartHelper.executeChart(Unknown Source)
        at com.justep.report.core.XReportChartHelper.executeChart(Unknown Source)
        at com.justep.report.core.XReportHelper.a(Unknown Source)
        at com.justep.report.core.XReportHelper.executeXReport(Unknown Source)
        ... 22 more


------回复内容仅供参考

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36185
发表于 2018-3-13 14:06:44 | 显示全部楼层
确认是不是有空数据导致的
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



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

使用道具 举报

197

主题

834

帖子

1511

积分

金牌会员

Rank: 6Rank: 6

积分
1511
QQ
 楼主| 发表于 2018-3-13 14:34:03 | 显示全部楼层
jishuang 发表于 2018-3-13 14:06
确认是不是有空数据导致的

不是空数据,我这个sql 是根据id查找的,我这几个字段都有数据
------回复内容仅供参考
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36185
发表于 2018-3-13 14:57:57 | 显示全部楼层
把sql语句和chart的设置发一下看看
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



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

使用道具 举报

197

主题

834

帖子

1511

积分

金牌会员

Rank: 6Rank: 6

积分
1511
QQ
 楼主| 发表于 2018-3-13 15:00:43 | 显示全部楼层
jishuang 发表于 2018-3-13 14:57
把sql语句和chart的设置发一下看看

public static Table getGanTt(String fID){
                String sql ="SELECT fInvestmentNature,  fStartDate,  fEndDate FROM PM_BID_ProjectInfo  where fId ='"+fID+"'";
                Map<String, String> map = new HashMap<String, String>();
                map.put("ORACLE", sql);
                System.out.println("sql::::"+sql);
                Table tRect = SQL.select(map, null, "/PM/PP/data");
                return tRect;
               
        }



<div component="$UI/system/components/justep/chart/chart"
                    chart-name="chart" autoLoad="false" data-list="" xid="chart3"
                    dataList="rData">
                    <chart xid="chart4">
                      <config xid="default6"/>  
                      <series-set xid="series-set2">
                        <series xid="chartSeries2" chart-type="horizontal-gantt"
                          name="verticalganttchart">
                          <config xid="default13"/>  
                          <data title="" categoryAxis="fInvestmentNature" startDate="fStartDate"
                            endDate="fEndDate" ref="rData" xid="default9"/>
                        </series>
                      </series-set>
                    </chart>
                  </div>
设置的不对吧,有甘特图的文档吗?我想看看,第一次做
------回复内容仅供参考
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36185
发表于 2018-3-13 15:43:38 | 显示全部楼层
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



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

使用道具 举报

197

主题

834

帖子

1511

积分

金牌会员

Rank: 6Rank: 6

积分
1511
QQ
 楼主| 发表于 2018-3-13 15:56:10 | 显示全部楼层
jishuang 发表于 2018-3-13 15:43
http://docs.wex5.com/%E7%AC%AC4%E7%AB%A0%E5%9B%BE%E8%A1%A8%E7%A4%BA%E4%BE%8B/

结帖吧。
------回复内容仅供参考
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-7-6 17:14 , Processed in 0.051842 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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