I'm writing a custom aggregate function for use in SSRS. However, I'm unsure of what type of object SSRS uses to pass multiple-row values to aggregate functions.
What type of input parameter does my VB function need to accept to properly handle multiple values from SSRS?
We can use the global parameters collection via custom code in a Code block of the report definition. You can refer to the following custom code, it is returns a string concatenated all the values of the multiple parameter:
Public Function ShowParameterValues(ByVal parameter as Parameter) as String Dim s as String If parameter.IsMultiValue then s = "Multivalue: " For i as integer = 0 to parameter.Count-1 s = s + CStr(parameter.Value(i)) + " " Next Else s = "Single value: " + CStr(parameter.Value) End If Return s End Function
We can add the below expression to get the parameter values.
There is an article about References to Parameters from Code, you can refer to it.
Hope this helps.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.
Thank you for the response.
I understand how to do this with parameter values from SSRS (as they are defined as arrays), however, I am trying to do this with Fields!SomeField.Value data from a report's dataset.
In essence, I am trying to write a custom aggregate. I need to know how to pass multiple rows of Field! data to a function, not Parameter! values.
Thank you again.