RDLC Group number

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.