Newbies oomhs Posted June 26, 2002 Newbies Posted June 26, 2002 I need to count the summarized fields in a report I am doing and am not having any luck with the count or the get summary function. I am summarizing 592 records and need to show the summarized count not the total count. A running total would be even better. Has anyone ever tried this successfully or unsuccessfully.
Kurt Knippel Posted June 26, 2002 Posted June 26, 2002 What EXACTLY are you trying to accomplish? Do you mean you need to show the count of the records being summarized, rather than the total of the field being summarized? For example: You need to count the 592 records, rather than the $587,908 that they total? What do you actually mean when you say "running total". There is a summary field type for this, does this not give you what you want?
KentL Posted June 26, 2002 Posted June 26, 2002 If I'm understanding the question, a summary field will work, just set it to be a "count of" some field included in the report. Is this what you're looking for?
Newbies oomhs Posted June 26, 2002 Author Newbies Posted June 26, 2002 No not exactly, I guess I didn't explain the problem well enough. As an example I'll use the Invoice/Customer model (this is actually for a music publishing company but that would just make this more complicated). Say I have a database with 468 Invoices. I want to do a report that summarizes/sorts the invoices by Customer and tells me the number of unique customers in that report either as a grand total or by numbering 1,2,3,4,5,6,... each individual customer. Any summary count fields that I use give me the count of Invoices instead of the count of Customers. Thanks for your input
Kurt Knippel Posted June 26, 2002 Posted June 26, 2002 This gets complicated since you need to count records that do not actually exist in this DB. Start by determining how many records there are for a given customer. cCountOfInvoices = Count ( Self by CustomerID::InvoiceNumber ) Then each record needs to divide 1 by the above so that the total of all records for a given customer totals 1. cPortionOfTotal = 1 / cCountOfInvoices Finally setup a summary field which totals the above field. This should result in a total of 1 for each customer. Then just display this field on a Grand Summary part (either Leading or Trailing). sCustomerCount = Total of cPortionOfTotal It'll look something like this: CustomerID cPortionOfTotal sCustomerCount 1 0.33333 0.33333 1 0.33333 0.66666 1 0.33333 1.00000 2 0.25 1.25000 2 0.25 1.50000 2 0.25 1.75000 2 0.25 2.00000 and so on...
Newbies oomhs Posted June 26, 2002 Author Newbies Posted June 26, 2002 Rock on Capt Kurt- That makes much sense. I will go try now
LiveOak Posted June 27, 2002 Posted June 27, 2002 The really simple way is to create a layout with only a subsummary field by Customer set to create a page break after each occurrence. Sort by Customer (using your example), enter preview mode, Go to Record/Request/Page (last), and set a global to the Status(CurrentPageNumber). I'm not exactly sure if rounding errors will affect Kurt's approach for large files. -bd
Newbies oomhs Posted June 27, 2002 Author Newbies Posted June 27, 2002 Yeah I tried that one already, but it doesn't work for the look of the report printout. Thanks
Recommended Posts
This topic is 8242 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