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

在SQL数据集中明细字段的参数配置中设置排序,预览查询时提示“ORDER BY 子句在视图、内联函数、派生表、子查询和公用表表达式中无效”的错误 #2984

Closed
gaoxiaoniu opened this issue Sep 21, 2024 · 3 comments

Comments

@gaoxiaoniu
Copy link

版本号:

1.8.1 绿色免安装版

问题描述:

在SQL数据集中明细字段的参数配置中设置排序,预览查询时提示“ORDER BY 子句在视图、内联函数、派生表、子查询和公用表表达式中无效”的错误

错误日志&截图:

PreparedStatementCallback; uncategorized SQLException for SQL
[SELECT COUNT(1) total FROM
( select * from
(select a.bhrq,c.code,c.name,a.fhrq,b.classify,(case when isnull(b.ph,'') = '' then b.bmdj else b.ph end) as ph ,b.barcode,b.htdocno,b.wei ,b.bmdj,b.width,b.depth,b.sfkh,b.bzfs,b.ts,b.cg ,a.remarks ,convert(varchar(10),a.bhrq,120) + '' + convert(varchar,a.id) as id ,convert(varchar(10),a.bhrq,120) + '' + convert(varchar,b.deid) as deid
from [Talent_Server_187].[DY].[dbo].[xs_fhdbhde] b left join [Talent_Server_187].[DY].[dbo].[xs_fhdbh] a on b.id = a.id left join [Talent_Server_187].[DY].[dbo].[Bs_Customer] c on a.khid = c.id) jeecg_rp_temp where bhrq>= ? AND bhrq<= ? ORDER BY bhrq,code ASC ) temp_count]; SQL state [S0001]; error code [1033]; 除非另外还指定了 TOP、OFFSET 或 FOR XML,否则,ORDER BY 子句在视图、内联函数、派生表、子查询和公用表表达式中无效。; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 除非另外还指定了 TOP、OFFSET 或 FOR XML,否则,ORDER BY 子句在视图、内联函数、派生表、子查询和公用表表达式中无效。

重现步骤:

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

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

zhangdaiscott commented Sep 22, 2024

请针对问题提供[报表设计配置或SQL脚本]或在官网制作报表示例并提供ID;

并补充说明数据库类型和具体配置截图

@jeecgos
Copy link
Collaborator

jeecgos commented Sep 30, 2024

cr

@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