Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sorting and grouping (Access 2000)

    In building my report I have chosen the field customerid as the grouping level. Following this in the sorting and grouping levels I have customerid as ascending. However I do not want the report per custoemrid, but per liters in descending level.if I try to delete customerid from the soritng and grouping level, I delete also the controls in the order.How can I order the report according to the liters, after I have grouped the liters as per customerid?

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

    Re: sorting and grouping (Access 2000)

    Sorry, I don't understand. Do you want to group on CustomerID or not?

  3. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sorting and grouping (Access 2000)

    yes, i want to group on CustomerId, but i want to order the customers in descending order depending on the liters, and i cannot do that. The report orders the results depending on the customerid number, and i cannot replace it with the SumOfLiters in the Sorting and Grouping. So in short i want to group on customers but order them depending on the liters sold.I am applying a word document to see how the report looks when grouped by customers.I want only to arrange the customrs in descending order depending on the sum of liters
    Attached Files Attached Files

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: sorting and grouping (Access 2000)

    Why dont you sort descending on litres then sort by customerid ascending (for when 2 lots of litres are equal).

    I would not have a grouping (as it doesn't make sense to me in this instance, altho i could be wrong), as there is only 1 record per customer.
    You could bold the customerid on the same line as the litres to distinguish customers.

  5. #5
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sorting and grouping (Access 2000)

    In need the grouping per customers in order to gather all the sales.What is shown in the report will be all right, only i want the customers to be ordered not per customers but per liters.But deleting the customerid in the grouping and sorting deletes the contros in the report too.

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

    Re: sorting and grouping (Access 2000)

    Create a totals query that groups by CustomerID and that sums the liters:

    <table border=1><td>CustomerID</td><td>SumOfLiters</td><td align=right>35</td><td align=right>2616</td><td align=right>1720</td><td align=right>1463</td><td align=right>...</td><td align=right>...</td></table>
    Save this query as (for example) qrySumLiters.
    Next, create a query based on qrySumLiters and on the table or query that currently acts as the record source for the report.
    Join them on CustomerID.
    Add the fields from the table/query to the query grid, plus the SumOfLiters field from qrySumLiters.
    Save this new query and use it as record source for the report.
    You can now group on the SumOfLiters field, descending, then on CustomerID.

Posting Permissions

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