Last 10 records report

  • Thread starter Thread starter Simon
  • Start date Start date
Do it in the query your report is based on. Sort descending in the field
that defines your last 10 records. Right click in the query window and click
on properties in the dialog that appears. Change the Top Values property to
10. Open your report in design view and click on the Sorting and Grouping
button in the toolbar at the top of the screen. Sort on that same field
Descending.
 
Geat! it work on single table.
I should tell at the begining that I have 2 tables one to many relationship:
tCustomer: CustomerID, Name, Address (1000 customer records)
tTrip: CustomerID, TripID, TripDate (each customer have more
than 1000 trips, on differrence tripdate)
want to report limited to only the last 5 trips for all customer like this
customer1 last 5th trips 12/24/04
customer1 last 4th trips 12/01/04
customer1 last 3th trips 08/12/04
customer1 last 2nd trips 07/15/02
customer1 last 1st trips 12/20/01
customer4 last 2nd trips 12/25/03
customer4 last 1st trips 12/24/03

customer #1 had more than 30 trips since2001
customer #2 and #3 had no trips at all
customer #4 had only 2 trips since 2003


simon
 
Geat! it work on single table.
I should tell at the begining that I have 2 tables one to many relationship:
tCustomer: CustomerID, Name, Address (1000 customer records)
tTrip: CustomerID, TripID, TripDate (each customer have more
than 1000 trips, on differrence tripdate)
want to report limited to only the last 5 trips for all customer like this
customer1 last 5th trips 12/24/04
customer1 last 4th trips 12/01/04
customer1 last 3th trips 08/12/04
customer1 last 2nd trips 07/15/02
customer1 last 1st trips 12/20/01
customer4 last 2nd trips 12/25/03
customer4 last 1st trips 12/24/03

customer #1 had more than 30 trips since2001
customer #2 and #3 had no trips at all
customer #4 had only 2 trips since 2003
 
Back
Top