Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I rank my data?

Status
Not open for further replies.

arachnoid

Programmer
Jun 14, 2002
108
US
I am attempting to develop a Top 20 Customers YTD Sales Report, but I am unsure how to rank the customers by their sales.

I am only wanting to print the current top 20 and the previous months top 20 customers on the report and then create summaries for each.

Any insight will be greatly appreciated.

 
Insert a group by cust number or name, etc.
Insert a summary for sales by cust.
Highlight the summarized sales amount and click the A-Z icon. Choose For this group sort Top N where N=20.
Depending on what data is stored you might have to create paramaters for beginning and end sales date and set criteria using these parameters.
 
Thanks, that is very helpful.

Another question though...

How could I created a # field that labels each customer with its appropriate rank and another field that contains their previous rank?

Thanks.
 
I do not believe prevous rank is something you can so with crystal.

Crystal can store and remmeber numbers for that particular execution of the report, but not until the next execution of the report, to the best of my knowledge. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
You might be able to run a subreport that check their standing last month (assuming the old data is still available and hasn't changed) and then use an array to pass the rankings to the main report, and then check each person against the array. But you would have to be pretty handy with Crystal formulas and variables. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Ken beat me to that reply (subreport!)
Another option would be to store that data into a new table. Not easy, but could be done. Depends on the database and it's import functionality. I use a crystal report currently for a top N as well. I export the report in a .xls format, and import that data into a SQL table (SQL server 2000). Wrote a script to do the work, and it's a good solution, plus I can use that table to run YTD comparison data report.

It's an option!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top