276 Star 2.2K Fork 913

JEECG官方 / JimuReport

 / 详情

数据中存在 . \~时会导致横向无法分组,原因为语法错误,无法进行分组

Done
Opened this issue  
2021-09-07 10:28
版本号:

2.4.6

问题描述:

当需要横向分组的数据中存在'.'时,会后台会报出编译异常的问题。存在时,也会报出语法错误,不允许出现在""后面

错误日志&截图:

需要分组的数据中存在~
需要分组的数据中存在.

重现步骤:

JSON数据修改来自官方文档.报表设计器.三、数据报表设计[1.4组合动态列分组]
存在问题的JSON如下:(moth作为横向分组,数据中存在~,region、province作为纵向分组,其余属性均为动态属性)
{
"data": [
{
"region": "华南",
"province": "广东省",
"moth":"1月~2月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"2月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"3月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"4月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"5月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"6月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"1月",
"sales_1": "10000",
"gift_1": "1000",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"2月",
"sales_1": "10000",
"gift_1": "1000",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"3月",
"sales_1": "48887",
"gift_1": "3960",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"4月",
"sales_1": "51484",
"gift_1": "7440",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"5月",
"sales_1": "10000",
"gift_1": "1000",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"6月",
"sales_1": "46388",
"gift_1": "4000",
"proportion_1": "10%"
}]
}

存在问题的JSON如下:(moth作为横向分组,数据中存在.,region、province作为纵向分组,其余属性均为动态属性)
{
"data": [
{
"region": "华南",
"province": "广东省",
"moth":"1月2021.1",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"2月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"3月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"4月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"5月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广东省",
"moth":"6月",
"sales_1": "1062789",
"gift_1": "15346",
"proportion_1": "15%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"1月",
"sales_1": "10000",
"gift_1": "1000",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"2月",
"sales_1": "10000",
"gift_1": "1000",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"3月",
"sales_1": "48887",
"gift_1": "3960",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"4月",
"sales_1": "51484",
"gift_1": "7440",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"5月",
"sales_1": "10000",
"gift_1": "1000",
"proportion_1": "10%"
},
{
"region": "华南",
"province": "广西壮族自治区",
"moth":"6月",
"sales_1": "46388",
"gift_1": "4000",
"proportion_1": "10%"
}]
}
能否将分组模板对数据的访问用["key值"]的形式

友情提示(为了提高issue处理效率):

  • 未按格式要求发帖,会被直接删掉;
  • 请针对问题提供报表设计SQL脚本或在官网制作报表示例并提供ID;
  • 针对不好重现的问题,请录制操作视频或详细的重现步骤;

Comments (3)

测试华仔 created任务
Expand operation logs

您好,请问下一个版本能解决这个问题吗?或者目前有什么直接改的方案吗?目前我想实现的就是分组表头需要用到.与~,但是我目前找到对应能修改模板的地方进行修改。能指点一下大致在哪个包里面生成的分组模板吗?

已修复,下个版本支持

lvdandan changed issue state from 待办的 to 已完成

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
Java
1
https://gitee.com/jeecg/JimuReport.git
git@gitee.com:jeecg/JimuReport.git
jeecg
JimuReport
JimuReport

Search

184635 d8eb8a04 1850385 161156 f1cf3f24 1850385