I have created an SSRS Report which is grouped on Date and Time column. Date as Parent Group and Time as Child Group. Also I have extracted date and time from a certain column in my select statement as follows :-
CONVERT(VARCHAR(10),DetectionTime,103) AS Detection_Date,
CONVERT(TIME(0), DetectionTime) AS Detection_Time
Further I created parameter and found out unique values from the given fields using the following code from this link http://mohamedakb.blogspot.com/2011/08/how-to-get-list-distinct-values-from.html and followed steps as mentioned to remove duplicates from given parameter:-
Public Shared Function RemoveDuplicates(parameter As Parameter) As String()
Dim items As Object() = parameter.Value
System.Array.Sort(items)
Dim k As Integer = 0
For i As Integer = 0 To items.Length - 1
If i > 0 AndAlso items(i).Equals(items(i - 1)) Then
Continue For
End If
items(k) = items(i)
k += 1
Next
Dim unique As [String]() = New [String](k - 1) {}
System.Array.Copy(items, 0, unique, 0, k)
Return unique
End Function
Now as I am trying to apply filter on the date column its not working like no output is being displayed. Also I tried to use other columns apart from grouping ones the filter value is getting applied for those columns but not for grouping columns.Is there any other way or am I missing something ?
items(i).Equals(items(i - 1))
is comparing non-rounded times, you could easily have no items removed from the array. So, what is the data type of the elements of items()? Are the times in the items rounded? – Laughing Vergil