Roger1 Posted January 15, 2001 Posted January 15, 2001 Have built a database of clients. For the sake of the exercise the DBase has 2 fields. A name field and an amount field. There are about 6 records for each name and my task is to write a script that firstly finds and groups all the records with matching names, then adds up the amounts in the corresponding amount fields for each client, placing them into a new sub total field. Finally I want to sort high to low based on the sub total field. The result is that whilst we receive various amounts from clients (single records) throughout the year, I will be able to group and get a complete total for each client, then see who pays us the most over the year. Can someone help please? ------------------
Kurt Knippel Posted January 15, 2001 Posted January 15, 2001 quote: Originally posted by Roger1: Have built a database of clients. For the sake of the exercise the DBase has 2 fields. A name field and an amount field. There are about 6 records for each name and my task is to write a script that firstly finds and groups all the records with matching names, then adds up the amounts in the corresponding amount fields for each client, placing them into a new sub total field. Finally I want to sort high to low based on the sub total field. The result is that whilst we receive various amounts from clients (single records) throughout the year, I will be able to group and get a complete total for each client, then see who pays us the most over the year. This is a pretty standard summary report. For simplicty sake create a summary field which totals the amount. Then create a layout and add a sub-summary part by client. Place the client and amount fields in the body, place the summary field in the sub-summary part. Sort the records by client and go to Preview mode. You will now see the summary part, totalling the amount field by each client. Now you can go crazy and add lots of other niceities. ------------------ =-=-=-=-=-=-=-=-=-=-=-=-= Kurt Knippel Consultant Database Resources mailto:[email protected] http://www.database-resources.com =-=-=-=-=-=-=-=-=-=-=-=-=
BobWeaver Posted January 17, 2001 Posted January 17, 2001 To sort by a total or subtotal summary field, see my post in this forum topic: http://www.fmforums.com/ubb/Forum30/HTML/000170.html
Recommended Posts
This topic is 8716 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now