admin管理员组文章数量:1129440
I have an RDLC report with a Pie Chart that has a category grouping and I'm trying to obtain the index of the current slice because I want to use it in the expression that computes the slice's color.
However, I can't seem to make it work. I've tried the following expressions:
=RowNumber(Nothing)
or
=RowNumber("Category_Group_Name")
or
=RowNumber("Chart_Name")
or
=RowNumber("Dataset_Name")
but none of these return the correct values, there are always duplicate values and/or skipped values.
What I'm looking for is the index of the slice (which is the same as the index of the legend entry), how do I correctly do that?
For clarity, the following screen shows how the chart is configured:
I have an RDLC report with a Pie Chart that has a category grouping and I'm trying to obtain the index of the current slice because I want to use it in the expression that computes the slice's color.
However, I can't seem to make it work. I've tried the following expressions:
=RowNumber(Nothing)
or
=RowNumber("Category_Group_Name")
or
=RowNumber("Chart_Name")
or
=RowNumber("Dataset_Name")
but none of these return the correct values, there are always duplicate values and/or skipped values.
What I'm looking for is the index of the slice (which is the same as the index of the legend entry), how do I correctly do that?
For clarity, the following screen shows how the chart is configured:
Share Improve this question edited Jan 8 at 17:53 Master_T asked Jan 8 at 17:47 Master_TMaster_T 7,90315 gold badges88 silver badges167 bronze badges1 Answer
Reset to default 0After some more trial and error, I've found the correct way. The correct expression to use is:
=RunningValue(CountDistinct(Fields!YourGroupingField.Value, "CategoryGroupName"), Sum, "ChartName")
Basically, this keeps a running count of the distinct count of the grouping property within the grouping (which is always 1
), so it will effectively keep track of the group index, which is the index of the slice of the pie.
本文标签: reporting servicesGetting the slice index in a pie chartStack Overflow
版权声明:本文标题:reporting services - Getting the slice index in a pie chart - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736697470a1948256.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论