Custom Sorting in SSRS Reports

To sort rows in a dataset you can choose a column in the dataset in the properties of the tablix or other report element.

Or if you need a custom sort where the sorting isn’t alphabetical or numerical you can add code to the report and then call the code in an expression in the sorting property of the tablix.

However, custom code is not allowed for reports that run in Microsoft Online.

An example not using custom code is to use an expression like this:


If the field productid has a value of delivery the sort value is 1 otherwise for any other value it is 0. This can be used to make sure a delivery line is shown last in a quote, order or invoice.

Leave a Comment

Your email address will not be published. Required fields are marked *