Normal Topic Need help with a report, Customer's total sales (Read 807 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Need help with a report, Customer's total sales
Nov 18th, 2008 at 7:30pm
Print Post Print Post  
My company wants to send out Christmas cards, to the top Customers (based on total sales).  I know how to make a report that shows each individual invoice and then subtotals each customer's total sales, but I don't know how to make a report that just lists the customer's code, name, and total.

The elements I'm working with are Code, Customer, Invoice Total, and the generated Subtotal.  I break on Code.  What I'm hoping for is a report that shows a single line for each customer, showing his code, name, and total total.  I do not use subpages in my form.

Can this be done?  I'm sure it can be done, but I'm not sure how to proceed.

What I've done so far (for our Crane customers) is to copy the report from the browser and paste it into Excel as Text.  I then move the total for each customer to one of his individual invoice lines, into a new column.  When that's done, after scanning around 4000 lines and moving the generated total data for about 700 customers, I sort on that column, descending.  That drops all the individual lines below the ones I've put the new column data into, and I can delete those lines.  Needless to say, this is a real pain.

Any advice or suggestions would be appreciated.  Thanks!
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Need help with a report, Customer's total sale
Reply #1 - Nov 20th, 2008 at 3:47pm
Print Post Print Post  
Hi Scott,

This is actually pretty easy. If you make everything in the Group Body invisible, you will get a Totals Only report. With the Code and Customer in the Group Header, this will give you two lines for each Code.

In order to get one line, put an Unbound Value box in the Group Footer for Code and another for Customer. A simple bit of code is needed to copy the value down. Make the elements in the Header invisible and all you'll have left is one line for each Code with the Totals you want.

Give me a few minutes and I'll make you a copy of Customers with a report that does this, so you can copy the technique in your Report.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Need help with a report, Customer's total sale
Reply #2 - Nov 20th, 2008 at 4:06pm
Print Post Print Post  
While Erica is doing that for you, why don't you consider adding a few fields to the Customer database?

Add Last Transaction Date, Last Invoice, MTD and YTD fields.  Then when you create invoices you can post vlaues to the Customers' records that show the MTD, YTD totals, the last Invoice and the last transaction date.   You will also need to post credits.  You could also add a filed for Previous YTD.

You can run a Mass Update that the start of each month and each year to clear the MTD,, YTD and Previous YTD fields.  Now you will have simple fields you can use in Retrieve Specs and on reports without having to cycle through all records and sub records for each customer.

This suggestion sounds familiar to me, did I already suggest this to you a few years ago?
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Need help with a report, Customer's total sale
Reply #3 - Nov 20th, 2008 at 4:25pm
Print Post Print Post  
Here you go, Scott. Look in the attached dsr at the CustomerTotals report. The Dummy element in the header triggers pickup of the desired values into static variables. The unbound elements in the footer print out those collected values. Holler if you have any questions.
  

CustomerTotalsReport.zip (Attachment deleted)

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Need help with a report, Customer's total sale
Reply #4 - Nov 20th, 2008 at 8:50pm
Print Post Print Post  
Erika, that's marvelous, thank you muchly.  Works great!

Bob, thanks for the ideas but that's a level of detail I really don't need.  This report will only run once a year (by me, anyway.  The boss may like to run it occasionally, once he finds it.)
  

**
Captain Infinity
Back to top
IP Logged