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!

Top N

Status
Not open for further replies.

deeya

MIS
Sep 18, 2006
78
GB
SQL Server CR10

This may be a simple one for you guys.

How can I have a Top N report but letting the user define the N via a parameter?

I have 3 groups, I only want the top N to apply to the 1st group and select all for groups 2 and 3.

Many Thanks
 
I guess the conditional formula for topN might only have become available in XI. In earlier versions, you would need to insert a running total {#grp1cnt} that does a count of {table.group1field}, evaluate on change of group ({table.group1field}), reset never. Then go to the section expert->group 1, group 2,group 3, details sections->suppress->x+2 and enter:

{#gpr1cnt} > {?topN}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top