Add Sorting to Table and Crosstab Items
To define a sorting for the Table or Crosstab items use the following steps:
Adding sorting to Table/Crosstab data item using Report Designer
- In the Report Designer.
- Click the Sorting ellipsis.
-
For each sort expression, follow these steps:
- Click New.
- Type or select an expression by which to sort the data.
- From the Direction column drop-down list, choose the sort direction for each expression. ASC sorts the expression in ascending order. DESC sorts the expression in descending order.
Click OK.
Adding sorting to Table/Crosstab Group (Row/Column Group) using Report Designer
- Open the Group Explorer.
- In the Report Designer, select the Table/Crosstab. This makes the selected item active in the Group Explorer.
- Choose a Row/Column Group and click its Sorting ellipsis.
-
For each sort expression, follow these steps:
- Click New.
- Type or select an expression by which to sort the data.
- From the Direction column drop-down list, choose the sort direction for each expression. ASC sorts the expression in ascending order. DESC sorts the expression in descending order.
Click OK.
Adding sorting to Table/Crosstab data item programatically
Telerik.Reporting.Sorting sorting1 = new Telerik.Reporting.Sorting();
sorting1.Expression = "=Fields.ProductID";
sorting1.Direction = Telerik.Reporting.SortDirection.Asc;
table1.Sortings.Add(sorting1);
Dim sorting1 As New Telerik.Reporting.Sorting()
sorting1.Expression = "=Fields.ProductID"
sorting1.Direction = Telerik.Reporting.SortDirection.Asc
table1.Sortings.Add(sorting1)