Well, here is what I would like to do.I have a table where data is entered in lots of material, and the report should group these lots in the order they been entered,and after evrey lot there should be a summary.
But these lots will repeat and they do not have to be combined, for exemple:
Desc Price
1.aaa 25
2.aaa 5
3.bbb 2
4.bbb 3
5.bbb 4
6.ccc 10
7.aaa 15
8.aaa 20
So in report should show like this
Desc. Price Extended Price
aaa 25
5
30
bbb 2
3
4
9
ccc 10
10
aaa 15
20
25
As you see "aaa" are the same kind, but yet they make two groups of "aaa" beacuse that was the order in which they were entred into the database.
The sort order has to be the same as they were entred, and be grouped by the type of lots.
The first thing to say is that unless you have a sequential recordid on these records you can have no control over the sequence that they would be processed in a report. It would be a lucky break if they happened to be processed in their input sequence.
Assuming you put an id on the records then my approach would be to process the records in a vba routine and add a group id to each record. The reporting then becomes trivial as you can use the group id to group on.
You should be able to use the sorting and grouping function to get these to dispay properly. Choose to group by Desc (Lot) and then use a group header and footer. You can total the lots up in the group footer (make a textbox that has the following control source "=sum([Price]).) I you also wanted a count of the lines entered you could create another textbox that has the following for the control source "=count([Desc]). That should give you totals for each lot and also a count for each line entered within the lots. If you want to send me your database, I can help you out by giving you a concrete example. Just email it to zinjamaster@msn.com (in zipped form please).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.