Hi tanzeelars,
1. Add a TextBox to left side of the grouping field.
2. In Visual Studio Go to Report Designer -> Report Properties... -> Select Code tab.
3. Paste the below code.
Public Sno AS Decimal
Public Function GetSerialno(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
Note: Replace the Group1 by your group's Name (Go to the group Property to know the group name).
5. Click OK
6. Go To the TextBox Expressions.. and write below code.
=code.GetSerialno("Group1")
Note: Replace the Group1 with your group's Name (Go to the group Property to know the group name).
7. Save and run.
Refer the screenshot below.
