0
我在我的報告下面的代碼:自定義代碼函數可以返回兩個值嗎?
Dim suma As Decimal = New Decimal()
Public Function SumLookup(ByVal items As Object()) As Decimal
If items Is Nothing Then
Return Nothing
End If
Dim ct as Integer = New Integer()
suma = 0
ct = 0
For Each item As Object In items
suma += Convert.ToDecimal(item)
ct += 1
Next
If (ct = 0) Then return 0 else return suma
End Function
Public Function GetMyVal() as Decimal
GetMyVal = suma
End Function
以上函數返回suma
,我通過調用該函數:
code.SumLookup(LookupSet(Fields!Claim_Currency.Value,Fields!Claim_Currency.Value,Fields!Total_Paid_Loss___LAE.Value, "dataSet"))
我想用兩個變量suma
和ct
我的報告。
如何調整函數使其返回兩個變量,然後如何從報表中調用它們?