Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 对ssrs中包含数字和字符串的nvarchar列进行排序_Reporting Services_Ssrs 2012 - Fatal编程技术网

Reporting services 对ssrs中包含数字和字符串的nvarchar列进行排序

Reporting services 对ssrs中包含数字和字符串的nvarchar列进行排序,reporting-services,ssrs-2012,Reporting Services,Ssrs 2012,我在报告服务方面有问题。目前,我使用reporting services中的按列排序,如果我有字符串值,它就可以工作,但如果我有数字和字符串值混合,它就不能工作。问题是当值混合时,例如: 1,11,2111,。。。ab,abc,bb 我试过: =CInt(Fields!ColumnName.Value) 但只有当我的列中有数字作为值时,这才是好的 如何在reporting services中解决此问题?添加两个排序表达式 =VAL(Fields!ColumnName.Value) 及 您想先

我在报告服务方面有问题。目前,我使用reporting services中的按列排序,如果我有字符串值,它就可以工作,但如果我有数字和字符串值混合,它就不能工作。问题是当值混合时,例如:

1,11,2111,。。。ab,abc,bb

我试过:

=CInt(Fields!ColumnName.Value)
但只有当我的列中有数字作为值时,这才是好的

如何在reporting services中解决此问题?

添加两个排序表达式

=VAL(Fields!ColumnName.Value)


您想先排序哪一个。数字或字母数字两者,如果我有数字,它们是数字,如果我有字母,那么字母OK,但如何实现这一点,以及一些IIF检查?你不需要做任何检查,第一种排序将对所有数字进行排序,任何字母将被排序为零,然后,第二个排序将按照字母顺序对“零”进行排序。只需按照我的建议添加这两种,然后尝试一下。
=Fields!ColumnName.Value