报表服务+排序表达式

编程入门 行业动态 更新时间:2024-10-12 10:22:37
本文介绍了报表服务+排序表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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:

  • (最简单)在SQL查询的末尾包含order by SomeValue1, SomeValue2子句.
  • 在表格属性中
  • 按两个表达式排序-即在表属性"对话框的排序"选项卡中,在第一行中输入=Fields!SomeValue1.Value作为表达式,然后单击下面的行并输入=Fields!SomeValue2.Value-如下所示:
  • (最困难)对表属性中的单个表达式进行排序,该属性由将SomeValue1和SomeValue2转换为填充0的固定长度字符串组成,并串联在一起-类似于原始值,但格式一致,例如:0000000001-0000000001./li>
  • (Simplest) Include an order by SomeValue1, SomeValue2 clause at the end of your SQL query.
  • 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:
  • (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.
  • 我推荐第一种方法.

    更多推荐

    报表服务+排序表达式

    本文发布于:2023-11-22 01:33:08,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1615454.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:表达式   报表

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!