report filter (1 Viewer)

NickNeville

Registered User.
Local time
Today, 21:43
Joined
May 17, 2009
Messages
119
Good morning all
I wonder if anyone could tell me if it is possible to filter out the number of lines in a list please. Basically I have E.g.50 results of a competition but I only want to show the top 6 of each class. Is it poss to only show these 6 top scores ?
Like Class AA (top 6 scores)
Class A (top 6 scores)
Class b etc
many thanks
Nick
 

Trevor G

Registered User.
Local time
Today, 21:43
Joined
Oct 1, 2009
Messages
2,341
You could look at adjusting the source if it is a query as you can select to show the top 6 there.

Open the query in design view then in the top part of the query use the right mouse button and select properties you should see a top value you can then set this to show top 6.
 

NickNeville

Registered User.
Local time
Today, 21:43
Joined
May 17, 2009
Messages
119
Many thanks Trevor that works a treat.
May I ask whilst on the subject. My report shows the classes of the competition as
A, AA, B, C, I guess due to the alpha numeric set up. I just wondered if there was any way to show the AA class first. Or shall I post a new thread?
thanks again for your help
Rgds
Nick
 

Trevor G

Registered User.
Local time
Today, 21:43
Joined
Oct 1, 2009
Messages
2,341
Nick,

In the query create an IIF statement which will assign a number to the data in the order that you want then just sort based on the IIF statement, something like this

SortExpr:IIF([FieldName]="AA",1,IIF([FieldName]="A",2,IIF([FieldName]="B",3,4)))
 

NickNeville

Registered User.
Local time
Today, 21:43
Joined
May 17, 2009
Messages
119
Hi Trevor
yea that worked a treat, all I had to do was sort on the report and that was done.
Yer a genius !
many thanks
Nick
 

NickNeville

Registered User.
Local time
Today, 21:43
Joined
May 17, 2009
Messages
119
Hi there trevor
I just realised that when I show the report it shows the topvalues of the first say 25 but is there a way of showing the top 5 values in each class ?
sorry about that, will I need to post this as a general question ?
Rgds
nick
 

Trevor G

Registered User.
Local time
Today, 21:43
Joined
Oct 1, 2009
Messages
2,341
This may seem a little long winded but it will work.

What you can do, is create separate queries based on each grade and select to show the top 5, if you then append them into a temp table and run the report from the temp table then you have your solution.

Remember that you will need to run a delete query as well to empty the table before appending, once set up you can create a macro to run the process and it should be quick enough.
 

Users who are viewing this thread

Top Bottom