locked
Sorting a column RRS feed

  • Question

  • User-1510915226 posted

    I have the following sample to illustrate what I have done and doing nothing to sort the list after making changes when I go to Group Properties>Sorting> Add> Sort by PerformedForPersonID from A to Z. 

    Note: The field I want to sort are (int, null)> Anyway, this is the cause of it since the sorting only has it from A to Z, or does this apply to just only to strings character like letters and numbers and not int?

    That is the only way I sort things here. Any ideas as to how I can sort the following sample?:

    Sample:

    PerformedForPerson

    ------------------------

    2

    35

    66

    1999

    I want it as:

    PerfomredForPerson

    ----------------------------

    1999

    66

    35

    2

    Wednesday, February 27, 2013 10:30 AM

Answers

  • User281315223 posted

    You just need to use ORDER BY (Property) DESC within your SQL call : 

      SELECT *
        FROM PerformedForPersonTable
    ORDER BY PerformedForPerson DESC

    Example

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 27, 2013 10:57 AM

All replies

  • User281315223 posted

    You just need to use ORDER BY (Property) DESC within your SQL call : 

      SELECT *
        FROM PerformedForPersonTable
    ORDER BY PerformedForPerson DESC

    Example

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 27, 2013 10:57 AM
  • User-1510915226 posted

    Thanks for the post, but I really want to do it using the Report Viewer SSRS 2208 R2. I appreciate it. If I was to create the table that way and have it descending for field, how would I do this? Because I added the ORDER BY clause and it returrned some error. I guess because I am joining another table within this view.

    Wednesday, February 27, 2013 11:12 AM
  • User-67082742 posted

    Hi Elvin!

    The Sort order A-Z and Z-A is only indicative and applies to both Numeric and string values. You may try using Z-A sort for your desired output.

    You can implement this sort at the Tablix level or at the group level

    Please let me know in case it doesn't work and I will post alternative solution.

    Thanks,

    Abhinav

    Friday, March 1, 2013 2:26 AM