• RDLC分组序号


    1、RDLC报表表格中添加序号,调用表达式RowNumber( Nothing )

    2、RDLC报表,表格分组后添加序号,分两种情况

    第一种情况,在分组内添加从1开始的序号,每个分组内都是从1开始计数。

    在报表属性-》代码中添加如下代码:

     1 Dim count As Integer
     2 Dim GroupName As String
     3 Public Function GroupCount(name As String) As String
     4 
     5 If (GroupName = "") Then
     6 count = 1
     7 GroupName = name
     8 GroupCount = count
     9 Exit Function
    10 End If
    11 
    12 If (GroupName = name) Then
    13 count = count + 1
    14 GroupCount = count
    15 Else
    16 count = 1
    17 GroupName = name
    18 GroupCount = count
    19 Exit Function
    20 End If
    21 
    22 End Function

    然后在需要添加序号的表格中添加表达式=Code.GroupCount(Fields!bm.Value)

    这种方法,在翻页的时候会重新从1开始计数,目前尚未解决,可以尝试将表格嵌套在矩阵中。

    第二种情况,分组外排序,即给组排序,从1开始,每多一个不同的分组添加1,有多少个不同的组,序号就增加到多少。

     1 Dim count As Integer
     2 Dim GroupName As String
     3 Public Function GroupCount(name As String) As String
     4 
     5 If (GroupName = "") Then
     6 count = 1
     7 GroupName = name
     8 GroupCount = count
     9 Exit Function
    10 End If
    11 
    12 If (GroupName = name) Then
    13 count = count
    14 GroupCount = count
    15 Else
    16 GroupName = name
    17 count = count + 1
    18 GroupCount = count
    19 End If
    20 
    21 End Function

    然后在需要添加序号的表格中添加表达式=Code.GroupCount(Fields!bm.Value) 

  • 相关阅读:
    Code Generation and T4 Text Templates
    Pros and Cons of T4 in Visual Studio 2008
    PSPInstance Object | Web Python
    Mod_Python中文文档
    [Medusa-dev] psp_handler
    Difference Between Mod_Python & Mod_Wsgi | eHow
    Mod_python: The Long Story
    HOWTO Use Python in the web — Python v3.0.1 documentation
    Js~对数组进行分组户数
    大叔也说并行和串行`性能提升N倍(N由操作系统位数和cpu核数决定)
  • 原文地址:https://www.cnblogs.com/lgx5/p/15664208.html
Copyright © 2020-2023  润新知