18 September 2014

Report often include sequence number/ serial number on its content. How to create a sequence number in SQL Server Reporting Services? Here is a sample.
As an example I still use this report.
Right click on column labeled "No. Siswa" then choose Insert Column to the Left.

Set label column name with No. Urut (means sequence number) and adjust column width.
Right click on detail cell of "No. Urut" then choose menu Expression...
Choose function RowNumber from Common Function -> Miscellaneous. Type dataset name "DBSAMPLE" as scope parameter to get sequence that applied to report content globally.
= RowNumber("DBSAMPLE")
The result is number sequenced from the beginning of report to last row.
Otherwise if we want to sequence only per group change scope parameter to group name "grpYear"
= RowNumber("grpYear")
The result is number sequenced per group.


Click here if you like this article.


Related Article:
  1. Installing Business Intelligence SQL Server 2005
  2. Creating Report with SQL Server Reporting (Wizard)
  3. Creating Report with SQL Server Reporting (without wizard) | Part 1
  4. Creating Report with SQL Server Reporting (without wizard) | Part 2
  5. Design Layout Report
  6. Creating Parameter for Filtering
  7. Stored Procedure as Report Data Source
  8. Parameter Data List from Database Query
  9. Creating Report Group
  10. Create Sequence Number Using RowNumber Function
  11. Uploading Report FIle (.rdl) to Report Server
  12. Remove Report Page Break/Page Break 
  13. Query to Generate Subscription List 
  14. Direct Printing to Printer

0 comments: