问题描述
我有一个包含常规柱形图的报告,该柱形图按产品分组(A 列),图表列值是成本的总和(B 列).默认情况下,它们按产品字符串的字母顺序排序.我希望它默认对列值进行排序,然后我想为用户提供能够在产品名称和列值之间切换的选项.我该怎么做?
I have a report containing a regular column chart that groups on product (column A) and the chart column values are the sums of the cost (column B). By default these are sorted alphabetically on the product string. I want it to sort the column values by default and then I would like to provide and option for the user to be able to switch between product name and column value. How do I do this?
谢谢
推荐答案
您可以使用 Text
类型的 Sort By
报告参数.
You can use a Sort By
report parameter of Text
type.
- 如下设置
Available Values
和Default Values
:-
- 在柱形图中,在
Category Group
的
Sorting
属性中添加表达式假设您将列值列设为 ColumnValue
,将产品名称列设为 ProductName
,则表达式应为:-
Assuming you have the column values column as ColumnValue
and Product Name column as ProductName
then the expression should be :-
=iif(Parameters!SortBy.Value = "ColumnValues",Sum(Fields!ColumnValue.Value),Fields!ProductName.Value)
这篇关于Report Services 排序柱状图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!