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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top 10 customers

Status
Not open for further replies.

ragu111

MIS
Aug 15, 2002
129
AE
i have a report which shows list of top customers, and each time of printing it prints all customers list. instead of this i canted to have only first 10 top customers have to be displayed on the list.

how can i do this?

Ragu-
 
Yes,

Go into the report design and look at the report design's RecordSource property. This will be either an SQL statement starting something like SELECT this, that, theother FROM blah
Change this to SELECT TOP 10 this, that, theother FROM blah

If it is the name of a stored query, open the query in design mode, change to SQL view and edit the code as above.

John

 
TKX JOHN IT WORKS

BUT ALONG WITH THE CUSTOMER NAME I HAVE THE TOTAL REVENUE, I WANTED TO HAVE TOP 10 REVENUE CUSTOMERS. WHEN I TRIED ABOVE IT PICKS ONLY TOP 10 CUSTOMER AND NOT REVENUE WISE

TKS
Ragu-[2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top