January 15, 200124 yr 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? ------------------
January 15, 200124 yr 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 =-=-=-=-=-=-=-=-=-=-=-=-=
January 17, 200124 yr 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
Create an account or sign in to comment