In order to use the built-in parameters area of the report, we would need to create a report Parameter that lists the column names. We can do that by creating a Business object that holds this for us:
public class ColumnSelector : DataTable
this.Rows.Add("Email Address", "EmailAddress");
this.Rows.Add("Not Sorted", "Not Sorted");
The last row is added simply for the sake of being able to show the report data unsorted if needed. We set the DisplayMember property of the parameter to displayText column and ValueMember to sortColumn column. Of course we should not forget to set the Visible property of the Report Parameter to true in order to show the parameter area above the ReportViewer.
Now is time to set the actual sorting:
Copyright © 2016, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.