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

Viewing only top 10 records for a group

Status
Not open for further replies.

YANKRAY

Technical User
Nov 7, 2003
283
Using CR10.

I have a report of parts issued that is grouped by Warehouse and then by Date Issued.

For the Date Issued group I want to only display the top 10 items based on the formula field that shows the number of days from Request to Issue. I show the average days for each month and need to keep that for all the records and not just the top 10

My data looks like this:

Group 1 (warehouse 1)

Group 2 January Average days = 20
item 1 30 days
item 2 29 days
item (the list goes on and on from latest to earliest)

Group 2 February Average days = 02
item 1 07 days
item 2 05 days
item (the list goes on and on from latest to earliest)

Group 1 (warehouse 2)

Group 2 January Average days = 18
item 1 30 days
item 2 29 days
item (the list goes on and on from latest to earliest)

Group 2 February Average Days = 33
item 1 40 days
item 2 35 days
item (the list goes on and on from latest to earliest)

I want to show only the top 10 items for each month, but need to keep the averages for each month.

Can anyone provide some instruction?

Thanks,
Ray
 
I think you can just sort descending on the {@days} formula. Insert a running total {#cntwingrp} that counts {table.itemID}, evaluate for each record, reset on change of group (month). Then go to the section expert->details->suppress->x+2 and enter:

{#cntwingrp} > 10

This depends upon your ability to sort by the {@days} field. If you can't, you need to share the contents of that formula (you should always share contents of formulas within posts).

-LB
 
You can use standard suppression for this.

In the group header use:

whileprintingrecords;
numbervar Counter :=0;

In the details use:
whileprintingrecords;
numbervar Counter;
Counter:=Counter+1

Now right click the details and select format section->X2 next to Supress and palce:

whileprintingrecords;
numbervar Counter;
Counter > 10

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top