RDLC分组后序号,从1开始

打开报表,在菜单报表(REPORT)点报表属性

在code下添加如下代码:(不用管语言是vb的)

Dim count As Integer

Dim GroupName As String

Public Function GroupCount(name As String) As Integer

 

If (GroupName = "") Then

count = 1

GroupName = name

GroupCount = count

Exit Function

End If

 

If (GroupName = name) Then

count = count + 1

Else

GroupName = name

count = 1

End If

 

GroupCount = count

 

End Function

再在行号的表达式写为:

=Code.GroupCount(“分组名”);

posted @ 2017-11-04 10:21  沙闻  阅读(859)  评论(0编辑  收藏  举报