October 26, 2015 at 11:25 am
Hello Everyone,
I have used the the following code to calculate the Median values for employee salary in SSRS.
***************************************
Dim values As System.Collections.ArrayList
Function AddValue(ByVal newValue As Decimal)
If (values Is Nothing) Then
values = New System.Collections.ArrayList()
End If
values.Add(newValue)
End Function
Function GetMedian() As Decimal
Dim count As Integer = values.Count
If (count > 0) Then
values.Sort()
GetMedian = values(count / 2)
End If
End Function
**************************************
The median values look fine in the development. However, after I deployed the report to the server and run the report in Internet Explore, all median values are showing up as 0.00. I do not get.
Please help.
Thanks
October 26, 2015 at 3:04 pm
One way to get around this is to calculate the median before it get's to SSRS. For example, say you are getting your data from a SQL Server Stored Procedure you could calculate the median in the stored procedure.
-- Itzik Ben-Gan 2001
October 26, 2015 at 4:02 pm
How to write a SQL query in SSRS expression?
Something like = Select * from ...
thanks
October 26, 2015 at 4:44 pm
fliu2265 (10/26/2015)
How to write a SQL query in SSRS expression?Something like = Select * from ...
thanks
You create a dataset, do your query there, then reference the value of the dataset in an expression.
-- Itzik Ben-Gan 2001
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply