1. Add ordinal to the RDLC report table, call Expression RowNumber (Nothing)
2, RDLC Report, table grouping after adding serial number, divided into two cases
In the first case, the 1-based ordinal is added within the grouping, and each group is counted from 1.
In the report properties-"code, add the following code:
Dim count as Integer
Dim GroupName as String
Public Function GroupCount (name as String) as String
If (GroupName = "") Then
Count = 1
GroupName = Name
GroupCount = Count
Exit Function
End If
If (GroupName = name) Then
Count = Count + 1
GroupCount = Count
Else
Count = 1
GroupName = Name
GroupCount = Count
Exit Function
End If
End Function
Then add the expression =code.groupcount (FIELDS!BM) in the table where you want to add an ordinal. Value)
In the second case, the sorting outside the group, that is, to sort the groups, starting from 1, each more than a different group to add 1, how many different groups, the number is increased to how much.
Dim count as Integer
Dim GroupName as String
Public Function GroupCount (name as String) as String
If (GroupName = "") Then
Count = 1
GroupName = Name
GroupCount = Count
Exit Function
End If
If (GroupName = name) Then
Count = Count
GroupCount = Count
Else
GroupName = Name
Count = Count + 1
GroupCount = Count
End If
End Function
Then add the expression =code.groupcount (FIELDS!BM) in the table where you want to add an ordinal. Value)
One method, the page will be restarted from the beginning of the 1 count, is not resolved, you can try to nest the table in the matrix.
RDLC Group number