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

分组功能异常 #2746

Closed
12341234-yangboran opened this issue Jun 28, 2024 · 4 comments
Closed

分组功能异常 #2746

12341234-yangboran opened this issue Jun 28, 2024 · 4 comments

Comments

@12341234-yangboran
Copy link

版本号:1.7.6
问题描述:

sql server数据库,多表连接配置数据报表。
积木报表运行的sql比配置的sql多字段,多出的字段没有带表别名,产生异常。

错误日志&截图:

image

重现步骤:

配置sql
SELECT
s.FSupplyName,
s.FMaterial,
s.FQty,
m.FBillDate
FROM
HAJX_KF_MaterialInStoreM_D as m
LEFT JOIN HAJX_KF_MaterialInStoreS_D as s ON m.FBillNo = s.FBillNo

积木报表执行sql
SELECT TOP
10 FSupplyName,
FMaterial,
FQty,
FBillDate
FROM
(
SELECT
ROW_NUMBER ( ) OVER ( ORDER BY ROW_ALIAS_1 ) PAGE_ROW_NUMBER,
FSupplyName,
FMaterial,
FQty,
FBillDate
FROM
(
SELECT
s.FSupplyName,
s.FMaterial,
s.FQty,
m.FBillDate,
fsupplyname AS ROW_ALIAS_1
FROM
HAJX_KF_MaterialInStoreM_D AS m
LEFT JOIN HAJX_KF_MaterialInStoreS_D AS s ON m.FBillNo = s.FBillNo
) AS PAGE_TABLE_ALIAS
) AS PAGE_TABLE_ALIAS
WHERE
PAGE_ROW_NUMBER > 0
ORDER BY
PAGE_ROW_NUMBER

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

  • 积木报表是一款免费报表产品,功能免费源码不开放;
  • 未按格式要求发帖,会被直接删掉;
  • 请针对问题提供[报表设计配置或SQL脚本]或在官网制作报表示例并提供ID;
  • 针对不好重现的问题,请录制操作视频或详细的重现步骤;
@12341234-yangboran
Copy link
Author

能解决吗

@zhangdaiscott
Copy link
Member

ws

@1298191366
Copy link

1298191366 commented Jul 10, 2024

未复现,我这里没有多出来的字段fsupplyname AS ROW_ALIAS_1,你看看是不是其他数据集里面的,没有加上别名

数据集:
image

报表sql拼接的:
image

sqlserver 版本号:
image

解析成功示意图:
image

@hoperunChen
Copy link

已修复,请等待新版本发布。

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

4 participants