locked
Sorting in SSRS RRS feed

  • Question

  • I have a field that is displayed as E1, E2, E3, E4, E5, E11, E12.  The issue that I'm having is when I sort that field in SSRS, it puts E11, E12, E1, E2 etc....


    How do I get it to put E11 after E5??

    Monday, March 5, 2018 3:33 PM

All replies

  • Hi,

    Use this expression in the sort fields :

    =CINT(MID(Fields!Column.Value,2,LEN(Fields!Column.Value)-1))


    Ousama EL HOR

    [If a post helps to resolve your issue, please click the "Mark as Answer"  of that post or click Answered "Vote as helpful"  button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


     [User Page]     [MSDN Page]     [Blog]     [Linkedin]

    Monday, March 5, 2018 3:47 PM
  • It is still sorting as E1, E10, E11, E12, E2. etc....
    Monday, March 5, 2018 3:57 PM
  • It is still sorting as E1, E10, E11, E12, E2. etc....

    Have you followed these steps :

    Go to the Tablix Properties for the tablix displaying the data in question. Go to Sorting tab. Click Add. In the "Sort by" field, click the expression button and type the following:

    Cint(MID(Fields!Column.Value,2,LEN(Fields!Column.Value)-1))


    Ousama EL HOR

    [If a post helps to resolve your issue, please click the "Mark as Answer"  of that post or click Answered "Vote as helpful"  button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


     [User Page]     [MSDN Page]     [Blog]     [Linkedin]

    Monday, March 5, 2018 4:05 PM
  • Yes, Here's my syntax:

    CINT(MID(Fields!UnitName.Value,2,LEN(Fields!UnitName.Value)-1))

    That is in my sorting fields tab on the Tablix

    Monday, March 5, 2018 4:06 PM
  • Try to use it in the detail group. Double click on Detail Group(you can see it from Row Groups).

    In the Group Properties. Click on Sorting then click on Add now select UnitName in column tab for Sort by.  and then change the expression by the expression I gave you.


    Ousama EL HOR

    [If a post helps to resolve your issue, please click the "Mark as Answer"  of that post or click Answered "Vote as helpful"  button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


     [User Page]     [MSDN Page]     [Blog]     [Linkedin]

    Monday, March 5, 2018 4:11 PM
  • Hi MelonyB

    It seems that you want to sort the numeric string, you could refer to my previous post  for details.

    I hope this will help you.

    Best Regards,
    Zoe Zhi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, March 6, 2018 7:37 AM