all groups > sql server reporting services > september 2006 >
You're in the

sql server reporting services

group:

How to use the TOP(N) Filter syntax?


Re: How to use the TOP(N) Filter syntax? Joe
9/6/2006 11:33:31 AM
sql server reporting services:
You mean like this:

SELECT TOP 500 Client.CLI_LastName
from Client

[quoted text, click to view]

Re: How to use the TOP(N) Filter syntax? Ben Watts
9/6/2006 1:35:36 PM
Just try something like this in your dataset

SELECT TOP (10) SomeField, COUNT(*) AS count
FROM SomeTable
GROUP BY SomeField
ORDER BY count DESC

That will count the number or rows pertaining to that specific field and
then put them in order by the count, showing only the top 10


[quoted text, click to view]

Re: How to use the TOP(N) Filter syntax? Ben Watts
9/6/2006 2:36:37 PM
another option is two have 2 datasets, make them the exact same except add
the top N statement to the dataset related to the chart and then have your
second dataset without the top N for the summary information. You would
still get the same info but from 2 different datasets.
[quoted text, click to view]

How to use the TOP(N) Filter syntax? Tarun Mistry
9/6/2006 6:12:06 PM
Im tearing my hair out on this one.

Could anyone provide information on how to use the "TOP(N)" filter syntax? I
want to return the top 10 aggregate rows. Not sure if it can do this?

Please help!

Thanks
Taz

Re: How to use the TOP(N) Filter syntax? Tarun Mistry
9/6/2006 8:29:50 PM
Hi guys, thanks for the responses.

I cannot change my query, therefore the filtering has to happen after the
dataset has been returned. This is because below my chart I will sumamrise
ALL of the informarion, however I only want the chart to display the top 10
entires (or whatever).

I thought i could do something like..

Count(Field!MyAggregate.Value) Top N 10

However this didnt do anything (that I could see).

Kind Regards
Taz

Re: How to use the TOP(N) Filter syntax? Tarun Mistry
9/6/2006 9:11:24 PM
Many thanks for your help Ben,

your previous post was the one I needed to make me realise where I was going
wrong.

Thanks again,

Taz


[quoted text, click to view]

AddThis Social Bookmark Button