码迷,mamicode.com
首页 > 其他好文 > 详细

RDLC分组后序号,从1开始

时间:2017-11-04 13:23:47      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:打开   代码   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(“分组名”);

RDLC分组后序号,从1开始

标签:打开   代码   exit   string   分组   cti   else   func   function   

原文地址:http://www.cnblogs.com/sheven/p/7782387.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!