Reputation: 349
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 ?
Upvotes: 1
Views: 3937
Reputation: 81
Old question, but I had an issue where filters were not working. I found that by adding the column that I was filtering by to the grouping resolved the issue.
EG: I was trying to filter so that only items that were HasElement = 'Y' were pulled into the result. I had to add "HasElement" to the grouping. Once I did this the filter worked properly.
In addition, when I attempted to "total" the filtered values in a column, the totals did not work. I was totaling in a column each row. To get the totals, I created a new column grouping that was grouped by "1" and by the hasElement column. Now the totals can be calculated properly.
Here's an image that may explain it better.
Upvotes: 1