SSRS Interactive Sort

The SSRS Interactive Sort is similar to the SQL ORDER BY Clause. Interactive Sorting is used to provide the sorting control to end-user as we see in popular e-commerce websites like Amazon.

Interactive Sorting in SSRS provides Up & Down arrows to toggle between Ascending Order and Descending order. In this article, we will show you, How to enable SSRS Interactive Sort (Sorting data at Text box 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.

SSRS Interactive Sort 1

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

SSRS Interactive Sort example

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

SSRS Interactive Sort 2

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

SSRS Interactive Sort 3

Click on the SSRS Interative Sorting Tab will display the below properties

  • Enable interactive sorting on this text box: If you want to enable the interactive sorting on this selected text box, then please choose this option.
  • Detail Row: If you want to enable the interactive sorting on Details Row, then 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 end up with incorrect results. For instance, you enabled the Interactive Sorting on Product Name and assigned Color column as Sort by. If this is the case, then when you click on Product name data will be sorted by color instead of Product Name.

In this example, We are going to apply interactive Sorting on [English Product Name]. So, Please select the [English Product Name] as Sort By Expression.

SSRS Interactive Sort 4

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

SSRS Interactive Sort 6

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

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

SSRS Interactive Sort 7

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

SSRS Interactive Sort 8

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