I populate a DataTable, then sort the DefaultView of that DataTable. When I set the DataTable as the source for my report, the sort doesn't work. In case it helps, here is the code (GetData returns a valid DataTable):
Dim dt As DataTable = a.GetData(Parm1, Parm2, Parm3)
If rbtSortByField1.Checked Then
dt.DefaultView.Sort = "Field1 ASC"
ElseIf rbtSortByField2.Checked Then
dt.DefaultView.Sort = "Field2 ASC"
ElseIf rbtSortByField3.Checked Then
dt.DefaultView.Sort = "Field3 ASC"
End If
rpt.SetDataSource(dt.DefaultView.Table)
'This also doesn't work
'rpt.SetDataSource(dt)