[英]How do I have a Row Group “under” a Column Group in SSRS?
I have some data that relates to some production inputs and outputs. 我有一些与某些生产投入和产出有关的数据。 What I want to do is, for each production run, show what went in and what came out. 我想要做的是,对于每个生产运行,都要显示进来什么和出来什么。
I have, at this point, something that looks like this: 在这一点上,我看起来像这样:
Run# Item Input Output
1 X 1
Y 1
2 A 2
B 3 2
C 3
Where Input/Output is derived from a 'direction' column group, and there are row groups on Run# and Item. 输入/输出是从“方向”列组派生的,而运行编号和项目上有行组。 What I want is something like this: 我想要的是这样的:
Run# Item Input Item Output
1 X 1 Y 1
2 A 2 B 2
B 3 C 3
Is this even possible? 这有可能吗? I feel like it should be, but as you can probably see from the title, I don't even know what to begin searching. 我觉得应该这样,但是正如您可能从标题中看到的那样,我什至不知道要开始搜索什么。
The way to do this is to add a rank() over the query like so: 这样做的方法是在查询上添加rank(),如下所示:
dense_rank() OVER (Run#, Direction Order By ItemCode) as rank
You can then perform a row grouping by the rank
field (you don't have to display the column), and add ItemCode
as a column in the column grouping. 然后,您可以按rank
字段执行行分组(不必显示列),并将ItemCode
作为列添加到列分组中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.