SSRS Interactive Sort

SSRS Interactive sorting will apply to a Column Name or table headings text box. The interactive sorting feature provides the Up and Down arrows to toggle between the Ascending and Descending order. When you click the down or up arrow, the whole table records will reorder based on the column, which may be ascending or descending. The SSRS interactive feature helps provide sorting control to end-users to sort the table based on the column name. For instance, popular e-commerce websites allow you to sort products using table headers.

SSRS Interactive sorting can be applied to the table rows or rows within a group. Internally, it uses the ORDER BY ASC/DESC concept. This article will show how to enable SSRS interactive sorting (sort data at the textbox level) with an example.

We use the below-shown report to explain SSRS Interactive Sort in Reports. Please refer to the Table ReportShared Data Source, and Dataset articles. It’s a simple SSRS report with Product Name, Color, Sales Amount, and Tax Amount columns.

Format Fonts and Background of a Textbox 8

If you observe the above screenshot, it displays the data in an unsorted manner.

SSRS Interactive Sort example

First, Select the Header Textbox of the report, and Right-click on it will open the context menu. Please select the Text Box Properties.. option from it.

Table Textbox Properties 1

Once we click on the Text Box Properties.. option, a new Text Box Properties window will be opened. Please select the SSRS Interactive Sorting tab.

Interactive Sorting Tab 2

Click on the SSRS Interactive Sort Tab will display the below properties

  • Enable interactive sorting on this text box: If you want to enable this selected text box, then please choose this option.
  • Detail Row: If you want to enable the interactive sorting on Details Row, please select this option.
  • Groups: Use this to enable the interactive sorting on Grouping Column.
  • Sort by: It allows you to select the available Column from the Dataset. Or we can create an Expression by clicking the fx button. For instance, If you want to sort the data by Product Name, select that column name.

NOTE: SSRS Interactive Sorting applies to individual Columns. If you select the wrong column as Sort By, you may have incorrect results. For instance, you enabled the Interactive Sorting on Product Name and assigned the Color column as Sort by. If this is the case, then when you click on the Product name, data will be sorted by color instead of Product Name.

Enable Interactive Sorting 3

In this example, we will apply interactive Sorting on [English Product Name]. So, Please select the [English Product Name] as Sort By Expression.

Choose the Column Name 4

Click the Ok button to finish enabling Interactive Sorting for the Product name. Let us Preview the SSRS Interactive Sorting Report

SSRS Interactive Sorting Preview 5

If you observe the above screenshot, data is sorted by the Product Name in Ascending Order.

Let us click the down arrow to sort the data in Descending order

Interactive Sorting 6

Let us enable the Interactive Sorting for the remaining columns such as Color, Sales Amount, and Tax Amount using the steps mentioned above and see the preview.

Interactive Sorting 7

It is how we provide the Dynamic sorting option to end-users.