Grouping and sorting

H

HubbyMax

I have an inventory report that I need help with. I have a monthly report
that shows all items despersed each month that shows each requisition and
items ordered on that requisition. This report is sorted and grouped by
department. I now need to creat a summery report that only shows the
departments billing code, the department name, and the total amount charged
for each requisition. This must be grouped by department the sorted by
billing code.

The three fields of the db used are Cust2 (department code),Prime (main
billing code), and DTL (secondary billing code). I have been able to creat a
report that either groups by Cust2 or by DTL and Prime but can not get it ot
group by Cust2 then sort that group by Prime then DTL.
 
H

HubbyMax

This does not help much. Wouldn't I still have the same group and sorting
question?
 
K

KARL DEWEY

The subreport is a separate report and therefore has separate grouping and
sorting. It can be linked to the main so as to report subsets of main
categories or produce a totally independant data.
 
H

HubbyMax

)OK. I guess I am creating a sub report then. It is a seperate report that
draws it's info from the same query as the main monthly report. I have tried
setting the grouping and sorting but can only get it to sort on whatever
field I choose as the group. If I set cust2 as the "group" it groups the
records by group but only shows 1 total recoed for each group. If I set the
group as Prime or DTL I get all db entries of each cust2 but it is not sorted
by cust2. How do I get it to sort the records by cust2?
 
K

KARL DEWEY

You do know that you can sort on more than one field.

I need you to draw me a picture of what you want like this --
Cust2
Prime
DTL
Prime
DTL
Cust2

You can use your query to prduce two reports. Then place them inside of a
third as subreports. The third, being your main report, does not need any
source but just be a vehicle for the other two.
 
H

HubbyMax

I have tried to sort on 2 or three fields using the group/sort function but
only get results for the 1st "group" with no sorting.

I would want
Cust2 as the group
Prime as the main sort of a group
DTL as the refining sort of the group
 
K

KARL DEWEY

There should be no problem in sorting like you want.
Post example of output data that did not sort for you.
 
H

HubbyMax

When put the Cust2 as the grouping I only get 1 order listing for each
customer showing the total for all orders by the customer. If I change it to
group by Prime and sort by Cust2 I get all orders by all customer orders and
billing codes but they are not sorted by Cust2. I need it to show Cust2 and
list all billing codes used by that customer with the total cost to each
billing code. It should then go to the next Cust2 and do the same. The totals
are not an issue as they are handled by the query.
 
H

HubbyMax

(prime) (DTL) (cust2)

523 80 108140 4031 30 (only shows 1, should show 2 sorted by prime)
523 80 145130 4031 50
This is what happens if I group by cust2. It is sorted properly but does
not show each order for "30"

If I group by prime both of "30" are listed but not together.
 
K

KARL DEWEY

You list three field names but show five fields of data.

What is different in the two records that have (cust2) as 30?

Could it be that the data in the Prime is different like having a leadon
space?

Try doing some data analysis like this --
SELECT Prime, Count([Prime]) AS Prime_Count
FROM Table1
GROUP BY Prime;

See how many records you get. Does it match your number of main billing
codes?

Do the same for the other fields - count of Cust2 compared to number of
departments.
 
H

HubbyMax

The first 2 fields of data are always the same so they do not have to be
sorted or grouped. The repeat of the cust2 30 is because the 30 identifies
the department making the order. Each department could have several orders.
The prime numbers are main billing code with the DTL as a refining budget
code. What I need is to list order totals for each order made by 30 sorted
by prime then DTL. this should continue grouped by each cust2 number.

KARL DEWEY said:
You list three field names but show five fields of data.

What is different in the two records that have (cust2) as 30?

Could it be that the data in the Prime is different like having a leadon
space?

Try doing some data analysis like this --
SELECT Prime, Count([Prime]) AS Prime_Count
FROM Table1
GROUP BY Prime;

See how many records you get. Does it match your number of main billing
codes?

Do the same for the other fields - count of Cust2 compared to number of
departments.

--
Build a little, test a little.


HubbyMax said:
(prime) (DTL) (cust2)

523 80 108140 4031 30 (only shows 1, should show 2 sorted by prime)
523 80 145130 4031 50
This is what happens if I group by cust2. It is sorted properly but does
not show each order for "30"

If I group by prime both of "30" are listed but not together.
 
K

KARL DEWEY

<<What I need is to list order totals for each order made by 30 sorted by
prime then DTL.
I think the operative word here 'totals' as your report sums records it
rolls them up. It takes the two records and adds them together resulting in
a single line out, displaying the sum.

--
Build a little, test a little.


HubbyMax said:
The first 2 fields of data are always the same so they do not have to be
sorted or grouped. The repeat of the cust2 30 is because the 30 identifies
the department making the order. Each department could have several orders.
The prime numbers are main billing code with the DTL as a refining budget
code. What I need is to list order totals for each order made by 30 sorted
by prime then DTL. this should continue grouped by each cust2 number.

KARL DEWEY said:
You list three field names but show five fields of data.

What is different in the two records that have (cust2) as 30?

Could it be that the data in the Prime is different like having a leadon
space?

Try doing some data analysis like this --
SELECT Prime, Count([Prime]) AS Prime_Count
FROM Table1
GROUP BY Prime;

See how many records you get. Does it match your number of main billing
codes?

Do the same for the other fields - count of Cust2 compared to number of
departments.

--
Build a little, test a little.


HubbyMax said:
(prime) (DTL) (cust2)

523 80 108140 4031 30 (only shows 1, should show 2 sorted by prime)
523 80 145130 4031 50
This is what happens if I group by cust2. It is sorted properly but does
not show each order for "30"

If I group by prime both of "30" are listed but not together.





:

Post example of output data that did not sort for you.
--
Build a little, test a little.


:

When put the Cust2 as the grouping I only get 1 order listing for each
customer showing the total for all orders by the customer. If I change it to
group by Prime and sort by Cust2 I get all orders by all customer orders and
billing codes but they are not sorted by Cust2. I need it to show Cust2 and
list all billing codes used by that customer with the total cost to each
billing code. It should then go to the next Cust2 and do the same. The totals
are not an issue as they are handled by the query.

:

There should be no problem in sorting like you want.
Post example of output data that did not sort for you.

--
Build a little, test a little.


:

I have tried to sort on 2 or three fields using the group/sort function but
only get results for the 1st "group" with no sorting.

I would want
Cust2 as the group
Prime as the main sort of a group
DTL as the refining sort of the group

:

You do know that you can sort on more than one field.

I need you to draw me a picture of what you want like this --
Cust2
Prime
DTL
Prime
DTL
Cust2

You can use your query to prduce two reports. Then place them inside of a
third as subreports. The third, being your main report, does not need any
source but just be a vehicle for the other two.

--
Build a little, test a little.


:

)OK. I guess I am creating a sub report then. It is a seperate report that
draws it's info from the same query as the main monthly report. I have tried
setting the grouping and sorting but can only get it to sort on whatever
field I choose as the group. If I set cust2 as the "group" it groups the
records by group but only shows 1 total recoed for each group. If I set the
group as Prime or DTL I get all db entries of each cust2 but it is not sorted
by cust2. How do I get it to sort the records by cust2?

:

The subreport is a separate report and therefore has separate grouping and
sorting. It can be linked to the main so as to report subsets of main
categories or produce a totally independant data.

--
Build a little, test a little.


:

This does not help much. Wouldn't I still have the same group and sorting
question?

:

I suggest trying a sub report.
--
Build a little, test a little.


:

I have an inventory report that I need help with. I have a monthly report
that shows all items despersed each month that shows each requisition and
items ordered on that requisition. This report is sorted and grouped by
department. I now need to creat a summery report that only shows the
departments billing code, the department name, and the total amount charged
for each requisition. This must be grouped by department the sorted by
billing code.

The three fields of the db used are Cust2 (department code),Prime (main
billing code), and DTL (secondary billing code). I have been able to creat a
report that either groups by Cust2 or by DTL and Prime but can not get it ot
group by Cust2 then sort that group by Prime then DTL.
 
H

HubbyMax

That is exactly what it does. Sorry I couldn't say it so clearly but I am
kinda new at this. As I stated before if I group on "prime" the report shows
all orders by all cust2s but I can't get it to sort by cust2 so all cust2
records are listed together for each cust2 such as 30.

KARL DEWEY said:
<<What I need is to list order totals for each order made by 30 sorted by
prime then DTL.
I think the operative word here 'totals' as your report sums records it
rolls them up. It takes the two records and adds them together resulting in
a single line out, displaying the sum.

--
Build a little, test a little.


HubbyMax said:
The first 2 fields of data are always the same so they do not have to be
sorted or grouped. The repeat of the cust2 30 is because the 30 identifies
the department making the order. Each department could have several orders.
The prime numbers are main billing code with the DTL as a refining budget
code. What I need is to list order totals for each order made by 30 sorted
by prime then DTL. this should continue grouped by each cust2 number.

KARL DEWEY said:
You list three field names but show five fields of data.

What is different in the two records that have (cust2) as 30?

Could it be that the data in the Prime is different like having a leadon
space?

Try doing some data analysis like this --
SELECT Prime, Count([Prime]) AS Prime_Count
FROM Table1
GROUP BY Prime;

See how many records you get. Does it match your number of main billing
codes?

Do the same for the other fields - count of Cust2 compared to number of
departments.

--
Build a little, test a little.


:


(prime) (DTL) (cust2)

523 80 108140 4031 30 (only shows 1, should show 2 sorted by prime)
523 80 145130 4031 50
This is what happens if I group by cust2. It is sorted properly but does
not show each order for "30"

If I group by prime both of "30" are listed but not together.





:

Post example of output data that did not sort for you.
--
Build a little, test a little.


:

When put the Cust2 as the grouping I only get 1 order listing for each
customer showing the total for all orders by the customer. If I change it to
group by Prime and sort by Cust2 I get all orders by all customer orders and
billing codes but they are not sorted by Cust2. I need it to show Cust2 and
list all billing codes used by that customer with the total cost to each
billing code. It should then go to the next Cust2 and do the same. The totals
are not an issue as they are handled by the query.

:

There should be no problem in sorting like you want.
Post example of output data that did not sort for you.

--
Build a little, test a little.


:

I have tried to sort on 2 or three fields using the group/sort function but
only get results for the 1st "group" with no sorting.

I would want
Cust2 as the group
Prime as the main sort of a group
DTL as the refining sort of the group

:

You do know that you can sort on more than one field.

I need you to draw me a picture of what you want like this --
Cust2
Prime
DTL
Prime
DTL
Cust2

You can use your query to prduce two reports. Then place them inside of a
third as subreports. The third, being your main report, does not need any
source but just be a vehicle for the other two.

--
Build a little, test a little.


:

)OK. I guess I am creating a sub report then. It is a seperate report that
draws it's info from the same query as the main monthly report. I have tried
setting the grouping and sorting but can only get it to sort on whatever
field I choose as the group. If I set cust2 as the "group" it groups the
records by group but only shows 1 total recoed for each group. If I set the
group as Prime or DTL I get all db entries of each cust2 but it is not sorted
by cust2. How do I get it to sort the records by cust2?

:

The subreport is a separate report and therefore has separate grouping and
sorting. It can be linked to the main so as to report subsets of main
categories or produce a totally independant data.

--
Build a little, test a little.


:

This does not help much. Wouldn't I still have the same group and sorting
question?

:

I suggest trying a sub report.
--
Build a little, test a little.


:

I have an inventory report that I need help with. I have a monthly report
that shows all items despersed each month that shows each requisition and
items ordered on that requisition. This report is sorted and grouped by
department. I now need to creat a summery report that only shows the
departments billing code, the department name, and the total amount charged
for each requisition. This must be grouped by department the sorted by
billing code.

The three fields of the db used are Cust2 (department code),Prime (main
billing code), and DTL (secondary billing code). I have been able to creat a
report that either groups by Cust2 or by DTL and Prime but can not get it ot
group by Cust2 then sort that group by Prime then DTL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top