请问SSRS报表设计器中filter函数如何使用。最好有举例。

0
已邀请:
0

郑大鹏 2016-03-22 回答

https://msdn.microsoft.com/zh-cn/library/fat7fw0s(v=vs.90).aspx
Filter 函数 (Visual Basic)
返回一个从零开始的数组,该数组包含基于指定筛选条件的 String 数组的子集。
Function Filter(
ByVal Source() As { Object | String },
ByVal Match As String,
Optional ByVal Include As Boolean = True,
Optional ByVal Compare As CompareMethod = CompareMethod.Binary
) As String()
参数
Source
    必选。要搜索的一维字符串数组。
Match
    必选。要搜索的字符串。
Include
    可选。Boolean 值,指示返回的子字符串是否包含 Match。如果 Include 为 True,则 Filter 函数返回将 Match 作为子字符串包含在其中的数组的子集。如果 Include 为 False,则 Filter 函数返回不将 Match 作为子字符串包含在其中的数组的子集。
Compare
    可选。表示要使用的字符串比较类型的数值。请参见“设置”了解具体的值。
示例:
Dim TestStrings(2) As String
TestStrings(0) = "This"
TestStrings(1) = "Is"
TestStrings(2) = "It"
Dim subStrings() As String
'Returns ["This", "Is"]
'
subStrings = Filter(TestStrings, "is", True, CompareMethod.Text)
'Returns ["This"]'
subStrings = Filter(TestStrings, "is", True, CompareMethod.Binary)
'Returns ["Is", "It"]'
subStrings = Filter(TestStrings, "is", False, CompareMethod.Binary)
0

- 取是能力,舍是境界 2016-03-22 回答

看看这个博客是否能明白呢。
http://www.flybi.net/blog/lovezsr/2658

要回复问题请先登录注册