Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

积木报表的主子表在主表没有数据的情况下页面会出错 #2660

Closed
xiaoyizeng opened this issue Jun 16, 2021 · 4 comments
Closed

Comments

@xiaoyizeng
Copy link

版本号:

jeecgboot 2.4.5

问题描述:

在2.4.5版本的jeecgboot中,积木报表设计这块,关于主子表发现有些问题。
例如要实现这样子的功能:主表是某个部门在某个月的请假汇总,子表是请假的人员详情。主子表参数关联为部门编号跟月份。
如果主表查询的数据结果为空,那么就会报错,java.lang.IndexOutOfBoundsException: Index: 0, Size: 0。

截图&代码:

image

友情提示: 未按格式要求发帖,会直接删掉。

@zhangdaiscott
Copy link
Member

你如何配置的,数据源怎么用的,详细写一下

@xiaoyizeng
Copy link
Author

1、以下是表格的数据
image
2、这个是设计的报表
image
3、这个是主子表的参数设置
image
4、这个是汇总的数据
SQL:select att_date,att_depart,count(1)as num from test_attendance group by att_date,att_depart
image
5、这个是表格的明细
SQL:select * from test_attendance where att_date=${att_date}
image
6、主表有数据的情况下,页面时正常的
image
7、主表没有查到数据的时候,就报错了
数据是用了一个日期,但是这个部门并没有这个人员请假的情况。
image
image

以上就是我的整个操作流程,这个应该跟数据源没有太大关系,我直接用的mysql也是这样子,其他的数据库也是一样的。

@1298191366
Copy link

已修复,待新版本发布

@zhangdaiscott
Copy link
Member

引用这个版本试试
http://jimureport.com/doc/log

<dependency>
  <groupId>org.jeecgframework.jimureport</groupId>
  <artifactId>jimureport-spring-boot-starter</artifactId>
  <version>1.3.51-beta</version>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants