Wednesday, April 28, 2010

Serial Number Column in SQL Reporting Services Report

Problem : You need to add a serial number column (incremented like 1,2,3...) in SQL Reporting Services Report.

Solution :
Sql reporting Services provides you with a Function : RowNumber(Nothing)
Insert Expression "=RowNumber(Nothing)" into your textbox & it will generate the serial number.

If you want the serial number to be generated for each group. Then just add the group name instead of "Nothing". For Example, the group name is "Group1" then the expression becomes "=RowNumber(Group1)". Same for nested data regions, just use the name of the data region instead of "Nothing".

Uses :
1. Can be used to generate numbered rows such as Serial Number Column
2. Can be used to insert Page breaks based on number of rows

2 comments:

Anonymous said...

Thanks it's working

Serial Number Column in SQL Reporting Services Report

Unknown said...

I have 5 groups in my report, then how to display running count. when i am using =rownumber(nothing), am not getting the proper value.