You can allow users to sort data interactively by setting the interactive sort properties on a textbox.
To set interactive sort properties on a textbox
- Right-click the textbox on which you want the users to click and select Properties.
- On the TextBox smart panel that appears, select the Interactive Sort page.
- Select the checkbox next to Add an interactive sort action to this textbox.
- Under Sort expression, enter an expression containing the value of the field on which you want to provide sorting.
- Under Data region or group to sort, choose either the option to sort on the current scope, or choose a different scope from the Choose data region or grouping combo box.
- Under Evaluate sort expression in this scope, choose either the option to evaluate the sort expression on the current scope, or choose a different scope from the Choose data region or grouping combo box.
- Click the Accept button in the lower right corner to close the smart panel and accept the changes.

Reference
Textbox Interactive Sort Page