Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
An obstacle may be either a stepping stone or a stumbling block
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!


How Do I Sort Alphanumerical Field Values in SQL Server Reporting Services 2019?

The client was creating a report in SQL Server Reporting Services 2019, and when the field was sorting the data was not sorting correctly.

When checking the data in the SQL server database, the data had been stored as a varchar (10) data type, allowing the end user to add alphanumerical data into the field, thus causing the sorting issues.


There are a number of methods to resolve this issue, but I found this method quite quick and easy to apply.

By using the VAL() function, which allows one to extract the numerical part of a field.

Then one can sort on the field by:

  1. In SQL Server Reporting services, add the Tablix/Matrix or List object to the canvas

  2. Add the required fields to the object

  3. Right click on the object

  4. Select the Properties option

  5. In the Properties dialog box, select Sorting - Add

  6. Press the [fx] button to the right of the Sort By text box

  7. Enter the expression for the field to be sorted on:


  8. Press the OK button

  9. Press the Add button

  10. In the Then By text box, select the same field again, from the drop down


  11. Press the OK button

  12. Run the report

If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us


Thanks for the tip!


Name *

Email Address *

Comment *

To prove you are human what is:

85 + 49 =