Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

can custom code function returns 2 values

$
0
0

i have the below code in my reports

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

the above function returns suma, and i call the function by:

code.SumLookup(LookupSet(Fields!Claim_Currency.Value,Fields!Claim_Currency.Value,Fields!Total_Paid_Loss___LAE.Value, "dataSet"))

I  want to use both variables suma and ct in my report. how adjust the function to make it return both variables and how to call them from the report.

Thank you


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>