Sorting in SSRS

The Sorting In SSRS is similar to the SQL ORDER BY Clause. Sorting is used to Sort the records as per the given Expression in Tablix properties and then Sorted data will display in the final SSRS Report. In this article, we will show you how to sort the data at the Table level (or tablix level) in SSRS with an example.

TIP: It is always better to apply SSRS Sorting at Textbox level (Interactive Sorting) only because it allows the user to sort the records dynamically.

We are going to use the below-shown report to explain, Sorting the data at Tablix level. Please refer to the SSRS Table Report article to understand the Shared Data Source and Dataset we used for this SSRS report. If you observe the below screenshot, It was a standard report with Product Name, Sales Amount, Color, and Tax Amount columns.

Sorting in SSRS 2014

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

Sorting in SSRS example

To apply SSRS sorting, Select the Top Left Corner of the report, and Right-click on it to open a context menu. Please select the Tablix Properties.. option from it

Sorting in SSRS 1

Once we click on the Tablix Properties.. option, a new Tablix Properties window will be opened. Please select the Sorting tab.

Sorting in SSRS 2

Click on the Add button will display the below properties

  • Sort by: It will allow you to select the available Column from the Dataset. Or we can create our own Expression by clicking the fx button. For instance, If you want to sort the data by Product Name, then select that column name.
  • Order: By default, A to Z selected as the Order type. You can change as per your requirement. A to Z means Ascending Order and Z to A means Descending Order
Sorting in SSRS 3

In this SSRS Sorting example, we are going to Sort the records by [English Product Name] in the Ascending Order. So, please select the [English Product Name] as Sort By Expression and A to Z as Order.

Sorting in SSRS 4

Click the Ok button to finish configuring Sorting at Tablix Level in SSRS. Let us Preview the Report

Sorting in SSRS 5

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

Let us add one more Sorting option at Tablix level, for better understanding. Here, We are going to Sort the data by [Sales Amount] in Descending Order and then sort by [English Product Name] in the Ascending Order.

Sorting in SSRS 6

TIP: If you want to delete the unnecessary Sorting Options, Please select the Sort Condition. Next, click on the Delete button.

Click the Ok button to finish Applying Sorting at Tablix Level in SSRS. Let us Preview the Report

Sorting in SSRS 7

If you observe the above image, Data is Sorted by the Sales Amount in Descending order. Then sorted by English product in the Ascending order.