Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show max value of 10 rows in ssrs

Tags:

ssrs-2008

I have one report in which I want to show 10 employees data which have max salary. I want to do this by SSRS please help me. Please do it by SSRS not by SSMS.

Thanks in Advance

like image 473
Vikas Avatar asked Feb 18 '23 22:02

Vikas


1 Answers

I'm assuming you have a Dataset with one row per employee which is sorted by salary, descending.

You can apply a TOP N filter to the table and set this to 10; this should return only the first ten rows:

http://msdn.microsoft.com/en-us/library/ms156270(v=sql.100).aspx

You could also set the Hidden attribute for the detail row in the table based on an expression that uses the RowNumber() function, e.g.

=IIf(RowNumber(Nothing) <= 10, False, True) which should work, too.

http://msdn.microsoft.com/en-us/library/ms159225(v=sql.100).aspx

like image 190
Ian Preston Avatar answered Mar 03 '23 09:03

Ian Preston