RDLC report group wise row numbering

  • Add a text box to left side of the grouping field
  • In Visual Studio Go to Report -> Report Properties->Select Code Option
  • Paste the below  code

Public Sno AS Decimal
Public Function GetSno(ByVal GroupName As String) As String
Dim strBuilder As New System.Text.StringBuilder(GroupName )
If GroupName .Contains(“Group1”) Then
Sno = Sno +1
Return Sno
Else
Return “”
End If
End Function

  • Replace the Group1by your group’s Name (Go to the group Property to know the group name)
  • Click OK
  • Go To the Expressions of the newly added text box and type
  • =code.GetSno(“Group1”)
  • Here Replace the Group1your group’s Name (Go to the group Property to know the group name)
  • Save and run

Ref the screenshot below

report-10.png

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s