列表中的多个组表达式 (ssrs 2005)
我对列表中的组表达式有疑问。我想使用两个表达式:
=Ceiling(RowNumber(Nothing)/3)' and '=Cint(Fields!kpilevel.Value)
它们都单独工作,但是当我将它们插入在一起时只有 1 个有效。我像这样插入它们:img718.imageshack.us/img718/736/problemxq.png
有谁知道如何解决这个问题?
预先感谢,克里斯
编辑:更好的解释
标记你是对的,我没有解释得很好。
我想将数据放入矩阵中,每行最多三列,并且我想使用表达式 =Cint(Fields!kpilevel.Value) 对数据进行排序。因此我想使用这两个表达式:Ceiling(RowNumber(Nothing)/3) 和 Cint(Fields!kpilevel.Value)。
但我无法得到正确的输出。我尝试以多种方式放置分组和排序表达式。结果不同:
最后情况: http://img257.imageshack.us/img257/5765 /10569159.png(图像已删除)
不同的输出:
列表 - 属性
排序:=Cint(Fields!kpilevel.Value) 升序
列表 - 分组和排序属性
分组依据:
=Ceiling(RowNumber(Nothing)/3)
=Cint(Fields!kpilevel.Value)
排序:
=Cint(Fields!kpilevel.Value) ascending
矩阵列组 - 分组和排序属性
分组依据:
=RowNumber("list1_Details_Group")
输出:(未分组但已排序)
1
2
3
4
等
>列表 - 属性
-
列表 - 分组和排序属性
分组依据:
=Ceiling(RowNumber(Nothing)/3)
=Cint(Fields!kpilevel.Value)
排序:
=Cint(Fields!kpilevel.Value) ascending
矩阵列组 - 分组和排序属性
分组依据:
=RowNumber("list1_Details_Group")
输出:(未分组和未排序)
1
2
9
10
等
列表 - 属性
排序:
=Cint(Fields!kpilevel.Value) ascending
列表 - 分组和排序属性
分组:
=Ceiling(RowNumber(Nothing)/3)
矩阵列组 - 分组和排序属性
分组依据:
=RowNumber("list1_Details_Group")
输出:(分组但未排序)
1 2 9
4 7 3
10 等
列表 - 属性
-
列表 - 分组和排序属性
分组:
=Ceiling(RowNumber(Nothing)/3)
矩阵列组 - 分组和排序属性
分组:
=RowNumber("list1_Details_Group")
排序:
=Cint(Fields!kpilevel.Value)
输出:(分组但排序奇怪)
1 2 9
10 11 13
3 4 7
12
我希望这可以实现更清楚,克里斯
I have a problem with group expressions in a list. I want to use two expressions:
=Ceiling(RowNumber(Nothing)/3)' and '=Cint(Fields!kpilevel.Value)
They work both individually, but when I insert them together only 1 works. I inserted them like this: img718.imageshack.us/img718/736/problemxq.png
Does anyone know how to solve this?
Thanks in advance, Kris
EDIT: Better Explanation
Mark you are right, I didn't explain it very well.
I want to place the data in a matrix, with a maximum of three columns per row, and I want to sort my data with the expression: =Cint(Fields!kpilevel.Value). Therefore I want to use both the expressions: Ceiling(RowNumber(Nothing)/3) and Cint(Fields!kpilevel.Value).
But I cant get the right output. I tried to place my grouping and sorting expressions, in multiple ways. With different results:
Last situation: http://img257.imageshack.us/img257/5765/10569159.png (Image Removed)
Different output:
List - Properties
Sorting: =Cint(Fields!kpilevel.Value) ascending
List - Grouping and Sorting Properties
Group on:
=Ceiling(RowNumber(Nothing)/3)
=Cint(Fields!kpilevel.Value)
Sorting:
=Cint(Fields!kpilevel.Value) ascending
Matrix columngroup - Grouping and Sorting Properties
Group on:
=RowNumber("list1_Details_Group")
Output: (ungrouped but sorted)
1
2
3
4
etc
List - Properties
-
List - Grouping and Sorting Properties
Group on:
=Ceiling(RowNumber(Nothing)/3)
=Cint(Fields!kpilevel.Value)
Sorting:
=Cint(Fields!kpilevel.Value) ascending
Matrix columngroup - Grouping and Sorting Properties
Group on:
=RowNumber("list1_Details_Group")
Output: (ungrouped & unsorted)
1
2
9
10
etc
List - Properties
Sorting:
=Cint(Fields!kpilevel.Value) ascending
List - Grouping and Sorting Properties
Group on:
=Ceiling(RowNumber(Nothing)/3)
Matrix columngroup - Grouping and Sorting Properties
Group on:
=RowNumber("list1_Details_Group")
Output: (grouped but unsorted)
1 2 9
4 7 3
10 etc
List - Properties
-
List - Grouping and Sorting Properties
Group on:
=Ceiling(RowNumber(Nothing)/3)
Matrix columngroup - Grouping and Sorting Properties
Group on:
=RowNumber("list1_Details_Group")
Sorting:
=Cint(Fields!kpilevel.Value)
Output: (grouped but strangly sorted)
1 2 9
10 11 13
3 4 7
12
I hope this makes it clearer, Kris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
接下来,我注意到在 SSRS 中按矩阵中数据项的函数而不是按数据项本身进行分组时会出现一些相当奇怪的效果。
因此,在这种情况下,我建议:
或者,如果 必须在矩阵中完成,那么(假设您使用的是 SQL 数据源)我建议
Following this, I have noticed some rather strange effects when grouping by functions of data items in matrixes in SSRS, rather than by data items themselves.
For this reason, in this context I would recommend:
Alternatively, if it has to be done in a matrix, then (assuming you're using a SQL data source) I would recommend