报表服务+排序表达式 [英] Reporting services + sort expression

查看:95
本文介绍了报表服务+排序表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候, 在我的报告服务中,我想添加排序.有什么办法可以添加一列的排序表达式中的两个字段的排序?像这样:

Greetings, In my reporting services I would like to add sorting. Is there any way I can add sorting by two fields inside one column's sort expression? something like:

=Fields!SomeValue1.Value
=Fields!Somevalue2.Value

当我使用此排序表达式时,值未正确排序. 我想排序的值类似

when I use this sort expression, values are not sorted correctly. Values I would like to sort are something like

SomeValue1    SomeValue2
10            11
9             1
20            21
13            12
13            7
17            6

这种情况是SomeValue1和SomeValue2来自另一个值,如下所示:

The case is that SomeValue1 and SomeValue2 comes from another value that as follows:

10-11
9-1
20-21
13-12
13-7
17-6

任何帮助将不胜感激.

Any help would be appreciated.

推荐答案

我可以想到三种可能性:

I can think of three possiblities:

  1. (最简单)在SQL查询的末尾包含order by SomeValue1, SomeValue2子句.
  2. 在表格属性中
  3. 两个表达式排序-即在表属性"对话框的排序"选项卡中,在第一行中输入=Fields!SomeValue1.Value作为表达式,然后单击下面的行并输入=Fields!SomeValue2.Value-如下所示:
  4. (最困难)对表属性中的单个表达式进行排序,该属性由将SomeValue1和SomeValue2转换为填充0的固定长度字符串组成,并串联在一起-类似于原始值,但格式一致,例如:0000000001-0000000001./li>
  1. (Simplest) Include an order by SomeValue1, SomeValue2 clause at the end of your SQL query.
  2. Sort by two expressions in Table Properties - ie. in the Sorting tab in the Table Properties dialog, enter =Fields!SomeValue1.Value as the expression on the first line, then click on the line below and enter =Fields!SomeValue2.Value - like so:
  3. (Hardest) Sort on a single expression in Table Properties consisting of SomeValue1 and SomeValue2 converted to 0-padded, fixed length strings, concatenated together - similar to the original value, but formatted consistently, like so: 0000000001-0000000001.

我推荐第一种方法.

这篇关于报表服务+排序表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆