Navigation: ABC Library Reference > ViewManager > ViewManager Methods >====== SetOrder (replace a sort order) ====== | ![]() ![]() |
SetOrder(// expression list// ), VIRTUAL
| SetOrder | Replaces the active sort order. |
| expression list | A string constant, variable, EQUATE, or expression that contains an ORDER attribute expression list. See the Language Reference–ORDER for more information. |
The **SetOrder **method replaces the active sort order for the ViewManager object.
The SetSort method sets the active sort order.
Implementation:
The ViewManager implements sort orders with the VIEW's ORDER attribute. The SetOrder method replaces the active sort order's expression list with the expression list.
Example:
** MyView.AddSortOrder(ORD:ByCustomer) !sort by customer no**
** !program code**
** MyView.SetOrder(CUST:CustName) !sort by customer name**
ThisWindow.OpenReport PROCEDURE
ReturnValue BYTE,AUTO
** CODE**
SELF.Process.SetFilter(CHOOSE(CHOICE(?List1),,'PEO:Gender=M','PEO:Gender=F'''))
SELF.Process.SetOrder(CHOOSE(CHOICE(?List2),'PEO:Id','PEO:LastName',|
** 'PEO:FirstName','PEO:Gender'))**
** EXECUTE(CHOICE(?List3))**
** SELF.Report &= Report**
** BEGIN**
** SELF.Report &= Report1**
** RecordsPrinted = 0**
** SELF.PrePass = 1 - SELF.PrePass**
** END**
** SELF.Report &= Report2**
** END**
** ReturnValue = PARENT.OpenReport()**
** RETURN ReturnValue**
See Also: SetSort





