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!

Exclude Top N

Status
Not open for further replies.

alexlc

Technical User
Oct 7, 2004
39
GB
Hi,
My boss wants a report that looks at the next 20 records after the Top N (20) records, without having to count them out himself.
Is there a formula that I can use to exclude the first set of results in a top N sort?

Cheers Alex
 
Put a count in each group. When it is 20 or less, suppress that group.

It should work with a summary count for something in the group header. Failing that, you could use a variable.
Code:
whileprintingrecords;
if {@XS_Reply} then
NumberVar MyCount:=MyCount+1
Put that in the group header.

If you haven't done suppression before, here's the method. Right-click on the detail section and choose Format Section. Then choose the formula icon (x+2 and a pencil) for suppression. Enter a formula.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
If you only have one group, and you have already applied a topN sort, then you go to the section expert->group header/footer (wherever your topN summary is)->suppress->x+2 and enter:

groupnumber <= 20 or
groupnumber > 40

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top