SSRS
TIPS
http://www.mssqltips.com/category.asp?catid=20
SELECT
NTILE(5)
OVER (ORDER
BY Name)
FROM TestDriveUsers
-- Total no of records 10, if it is using NTile(5) means the output willl be this format
1 2 3 4 5 6 7 8 9 10
1 1 2 2 3 3 4 4 5 5
--- NTILE (4) is used to total number of rows divided by 4
SELECT
CEILING(ROW_NUMBER()
OVER (ORDER
BY Name)/5)
+ 1
FROM TestDriveUsers
1 2 3 4 5 6 ………………….
1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5
http://www.mssqltips.com/category.asp?catid=20
How to set No of Rows per page in SSRS
=Ceiling(RowNumber(Nothing)/10)
More information available following links
Expression Examples - SSRS
Working with Report Snapshots in SQL Server Reporting Services (SSRS)
NTILE(5)
OVER (ORDER
BY Name)
FROM TestDriveUsers
-- Total no of records 10, if it is using NTile(5) means the output willl be this format
1 2 3 4 5 6 7 8 9 10
1 1 2 2 3 3 4 4 5 5
--- NTILE (4) is used to total number of rows divided by 4
SELECT
CEILING(ROW_NUMBER()
OVER (ORDER
BY Name)/5)
+ 1
FROM TestDriveUsers
1 2 3 4 5 6 ………………….
1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5