SSRS Reporting: How to limit the number of rows returned in a group

Guillermo Greco picture Guillermo Greco · Feb 18, 2015 · Viewed 8.4k times · Source

How can I limit the number of rows returned in a group?

So far, when the report runs, it returns a lot of records for each group. However, I only want it to return the top 4 records in each group.

I tried the expression: =Ceiling(RowNumber(Nothing)/4) but that's not what I am looking for.

I am using SQL Server 2012 Data Tools (Visual Studio 2010)

Thanks.

Answer

Jeffrey Van Laethem picture Jeffrey Van Laethem · Feb 18, 2015

In the group's properties, set a filter on the field you want, choose "Top N" as the operator, and 4 as the value.