RDLC分组后序号,从1开始

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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(“分组名”);

以上是关于RDLC分组后序号,从1开始的主要内容,如果未能解决你的问题,请参考以下文章