Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Christchurch
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sorting and grouping (2000)

    Hi, I have a report displaying product info for each customer. The underlying table has another field called "zee", which is a yes/no data type. I have the report grouping by ProductCode (and I then summarise various data within each product). I need to be able to incorporate a sorting within ProductCode so that non-zee products list first followed by zee products. I can't figure out how to make this happen - the answer is probably obvious! Can anyone help me with this?

    Thank you. Roger

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sorting and grouping (2000)

    A Yes/No field is stored as a number. The value Yes/True corresponds to -1, and No/False to 0. So you must add the "zee" field to the Sorting and Grouping window for the report, and set the sort order to Descending, so that 0 (No) will come before -1 (Yes).

    If I understand your description correctly ("a sorting within ProductCode"), the "zee" field should be immediately below ProductCode in the Sorting and Grouping window.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Christchurch
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sorting and grouping (2000)

    I need to add some more info for you, as your suggestion doesn't work. The ProductCode header and detail are not visible, only the ProductCode footer is shown, and in it I am summing the cost (and other data) of all the purchases of that ProductCode by that Customer. So with your method, I get no additional grouping on "zee", it still just groups on [ProductCode] alone. I hope I'm explaining this well enough...

    So what I need to do is be able to group on ([productCode] & [zee]) together somehow. Do I need to somehow create a custom field in the query to be able to do this, and then group on that? How would I do that?

    Roger

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sorting and grouping (2000)

    You originally wrote that you wanted to sort on "zee" within ProductCode. Now it turns out that you want to group on it. So set Group Header or Group Footer (or both) for the "zee" field to Yes in the Sorting and Grouping window.

  5. #5
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Christchurch
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sorting and grouping (2000)

    Hi Hans, sorry for being so unclear about what I needed to do, I still didn't do it too clearly last post either, it would seem. I have been struggling with this one for quite a few days, and as a result couldn't see my way through. I have just solved the issue like this: (sort of like my last posting)

    I created a new field in the query: ProductZ:[ProductCode] & [Zee]

    And changed the grouping field in the report design to ProductZ

    Hopefully that explains (with hindsight) what I was trying to do - thanks for helping though, because before posting here I was stuck.

    Cheers,
    Roger

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sorting and grouping (2000)

    Whatever works for you <img src=/S/smile.gif border=0 alt=smile width=15 height=15>. Check carefully that you get the results you expect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •