标签:打开 代码 exit string 分组 cti else func function
打开报表,在菜单报表(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(“分组名”);
标签:打开 代码 exit string 分组 cti else func function
原文地址:http://www.cnblogs.com/sheven/p/7782387.html