in

 

Sorting data in columns in Report Builder

Last post 05-14-2008 11:36 AM by John Filicetti. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 11-30-2007 1:42 PM

    • Max B.
    • Top 10 Contributor
    • Joined on 02-23-2006
    • Seattle
    • Posts 34

    Sorting data in columns in Report Builder

    This question came to me via email and I thought I'd post it here, as well as any replies in case other people can benefit from this information:

     

    Hi Max,I have a question about some options in reporting:  Can I sort w/o alphabetizing?  Right now the column that I’m sorting does so alphabetically… can I choose the order? Thank you!

    ~<name withheld>

  • 11-30-2007 1:55 PM In reply to

    • Max B.
    • Top 10 Contributor
    • Joined on 02-23-2006
    • Seattle
    • Posts 34

    Re: Sorting data in columns in Report Builder

    It is possible to sort your data by any visible (or invisible) property.

    In Report Builder, it looks like the data will automatically sort alphabetically by the first column of data.

    If you'd rather sort by some other property, insert that other data item in your report, select that new data column and sort; then, delete that column of data and choose to retain the sorting.  You will be prompted to do so.

    Give that a try and let me know!

    Thanks,

    Max

  • 12-03-2007 7:51 AM In reply to

    Re: Sorting data in columns in Report Builder

    Hi Max,

    I think I didn't ask the right question.  I grouped data according to phases, but instead of maintaining the order that the phases were in, Daptiv alphabetized them.  I do not want that... is there a way to rearrange the grouping order?

     Thank you.

     ~ashwina.

  • 12-03-2007 9:22 AM In reply to

    • Max B.
    • Top 10 Contributor
    • Joined on 02-23-2006
    • Seattle
    • Posts 34

    Re: Sorting data in columns in Report Builder

    Hi Ashwina:

    I understand your question now!  Sorry I didn't quite get it before.

    The answer is yes.  The data field you are looking for is called "Phase Number" and it corresponds to the individual phase settings for your projects.  Add it to your report, sort by it, and you'll get the desired order of phases.  See screenshot for example:

  • 12-03-2007 9:41 AM In reply to

    Re: Sorting data in columns in Report Builder

    Hi Max,

    My fault.  Is there a way to hide a column?  I'd like for the phase number not to show up on the report, it now looks the way i need it to look aside from the phase numbers.

     Thank you!

     ~ashwina.

  • 12-03-2007 9:47 AM In reply to

    • Max B.
    • Top 10 Contributor
    • Joined on 02-23-2006
    • Seattle
    • Posts 34

    Re: Sorting data in columns in Report Builder

    Yes, you can certainly hide a column -- even one by which you're sorting.  Go back to my original response above, and that's the part of your question I answered first.

    Basically, add the column, apply the sorting, then DELETE the column; you'll be prompted about whether you want to keep the sorting intact or not.  And you do, in this case.

    Did that work for you? 

    -Max

  • 12-03-2007 9:53 AM In reply to

    Re: Sorting data in columns in Report Builder

    No... I was not asked if I wanted to keep sorting intact.

  • 12-03-2007 11:22 AM In reply to

    • Max B.
    • Top 10 Contributor
    • Joined on 02-23-2006
    • Seattle
    • Posts 34

    Re: Sorting data in columns in Report Builder

    The reason you were not prompted to keep the sorting is because you hadn't actually applied an explicit sort to that column of data.  You were seeing the output sort correctly, in effect, simply because you inserted the Phase Number column as the FIRST column.  The FIRST column always sorts (automatically)!  Therefore, deleting that column didn't create a prompt to retain the sorting.

    If you go ahead and *explicitly* apply a sort to Phase Number, and *then* delete the column, you will get the prompt.

     

  • 05-14-2008 11:36 AM In reply to

    Re: Sorting data in columns in Report Builder

    Sorting is easy if you have field with numeric values.  What if you have a priority field with Priority of Low, Medium Low, Medium, Medium High, and High? From your toolbox, drag a Layout Calculation into your list report and include the follow statement (modified to match your information): 

     

    case
    when [Priority] = ('High') then 1
    when [Priority] = ('Medium High') then 2
    when [Priority] = ('Medium') then 3
    when [Priority] = ('Medium Low') then 4
    when [Priority] = ('Low') then 5
    end

      Then do a custom sort on this field that I called "priority number" - it works like a champ 
    John F. Filicetti, PMP, MBA
Page 1 of 1 (9 items)

Navigate: Home | Blogs | Forums | Solution Library  Get Help:  Contact | Feedback | FAQ   Terms of Use:  Terms & Conditions | Privacy Policy