如何在总和中排除多个值,具体取决于SSRS 2005中2列中的值?

时间:2009-04-21 07:38:52

标签: vb.net reporting-services

我有简单的列和它们各自的总和。但是,我从每个总和中排除了1个特定值,如此

`=Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value))`

根据我的SSRS 2005应用程序中的以下代码中的1列值:

    Public Shared Function ChangeWord(ByVal s As String) As String
    Dim strBuilder As New System.Text.StringBuilder(s)
    If s.Contains("Others") Then
        strBuilder.Replace("Others", "Others (FIG NOT COUNTED)")
        Return strBuilder.ToString()
    Else        
     If s.Contains("Temporary Placement") Then
          strBuilder.Replace("Temporary Placement", "Awaiting Progression")
          Return strBuilder.ToString()
     Else : Return s
  End If
    End If
End Function

Public Shared Function ExcludeOthers(ByVal rowDesc As String, ByVal rowVal As Integer) As Integer
    If rowDesc.Contains("Others") Then
        rowVal = 0
        Return rowVal
    Else
           If rowDesc.Contains("Awaiting Progression") Then
               rowVal = 0
           Return rowVal
Else
  Return rowVal
End If
    End If
End Function

现在我需要从名为“PROGRESSION”的第二列中排除另一个值(“Awaiting Progression”)。

由于我已经根据名为CATEGORY的1列排除了值,如果它是=(“等待进度”),如何更改=Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value))以从PROGRESSION列中排除值?

即。如何排除多个值,具体取决于SSRS 2005中2列中的值?

1 个答案:

答案 0 :(得分:1)

你能用这种技术吗?

Exclude hidden table row from total