R
rmcompute
I have coded the following inside the report open event:
........
OrderByOn = True
If Not LTrim(RTrim(strSort)) = "" Then
Select Case strSortOrder
Case "D"
Me.OrderBy = strSort & " " & "DESC"
Case Else
Me.OrderBy = strSort
End Select
End If
It changes the sort order dynamically on some reports but not others. On
the reports that it does not work on, they have their own groups set up under
View/Sorting And Grouping. Once the sort order is set up on the report
itself under View/Sorting And Grouping, is it then not possible to change it
dynamically in the program ? As an alternative, I sorted the data in a query
and had the report read the query. I was then able to change the order
programatically. I noticed,however, that the report was not in the order of
the query. I am using filters on the report; the data file contains
different time periods and the report filters out to only one.
1) Is there a way to programatically change the sort order when the order
has been set in the report as listed above ?
2) Is there anyway to guarantee that the report using no sort order in
itself would use the order of the sorted query it is reading ?
........
OrderByOn = True
If Not LTrim(RTrim(strSort)) = "" Then
Select Case strSortOrder
Case "D"
Me.OrderBy = strSort & " " & "DESC"
Case Else
Me.OrderBy = strSort
End Select
End If
It changes the sort order dynamically on some reports but not others. On
the reports that it does not work on, they have their own groups set up under
View/Sorting And Grouping. Once the sort order is set up on the report
itself under View/Sorting And Grouping, is it then not possible to change it
dynamically in the program ? As an alternative, I sorted the data in a query
and had the report read the query. I was then able to change the order
programatically. I noticed,however, that the report was not in the order of
the query. I am using filters on the report; the data file contains
different time periods and the report filters out to only one.
1) Is there a way to programatically change the sort order when the order
has been set in the report as listed above ?
2) Is there anyway to guarantee that the report using no sort order in
itself would use the order of the sorted query it is reading ?