Foxtable(狐表)用户栏目专家坐堂 → 请问老师代码


  共有2329人关注过本帖树形打印复制链接

主题:请问老师代码

帅哥哟,离线,有人找我吗?
有点色
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/3/12 20:47:00 [显示全部帖子]

 把不想显示的内容,写在 里面

 

Select Case e.Book.TempLate
    
    Case "横名册"
        
        Dim Filter As String = "单位名称 = '" & e.DataRow("单位名称") & "'"
        Dim dt As DataTable = DataTables("竖名册")
        Dim sum1 As Double = dt.Compute("Sum(正科配备)",Filter)
        Dim sum2 As Double = dt.Compute("Sum(实际正科)",Filter)
        Dim sum3 As Double = dt.Compute("Sum(副科配备)",Filter)
        Dim sum4 As Double = dt.Compute("Sum(实际副科)",Filter)
        Dim s1 As String = dt.GetComboListString("正科职数空缺", filter).replace("|", ",").trim(",")
        Dim s2 As String = dt.GetComboListString("正科职数备注", filter).replace("|", ",").trim(",")
        Dim s3 As String = dt.GetComboListString("副科职数备注", filter).replace("|", ",").trim(",")
        Dim s4 As String = dt.GetComboListString("副科职数备注", filter).replace("|", ",").trim(",")
s1 = iif(s1 > "",  "正科空缺:" & s1, "")

s2 = iif(s2 > "",  "副科空缺:" & s2, "")

        e.Book.Marks("分组统计字符") = "单位:" & e.DataRow("单位名称") & " 正科配备:" & sum1 & " 实际正科:" & sum2 & " " & s1 & " " & s2 & "        副科配备:" & sum3 & " 实际副科:" & sum4 & " 副科空缺:" & s3 & " 副科备注:" & s4         
End Select

 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/3/12 23:02:00 [显示全部帖子]

认认真真看4楼代码,参考着改。

 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/4/14 11:08:00 [显示全部帖子]

    Dim s8 as string = dt.GetComboListString("下属部门", filter & " and 单位性质 = '机关'").replace("|", ",").trim(",")
    Dim s9 as string = dt.GetComboListString("下属部门", filter & " and 单位性质 = '参公事业'").replace("|", ",").trim(",")
    Dim s10 as string= dt.GetComboListString("下属部门", filter & " and 单位性质 = '事业'").replace("|", ",").trim(",")
    s7 &= iif(s8 > "", "机关:" & s8, "")
    s7 &= iif(s9 > "", "参公事业::" & s9, "")
    s7 &= iif(s10 > "", "事业:" & s10, "")

 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/4/14 14:33:00 [显示全部帖子]

Select Case e.Book.TempLate
Case "横名册"
   
    Dim Filter As String = "单位名称 = '" & e.DataRow("单位名称") & "'"
    Dim dt As DataTable = DataTables("竖名册")
    Dim sum1 As Double = dt.Compute("Sum(正科配备)",Filter)
    Dim sum2 As Double = dt.Compute("Sum(实际正科)",Filter)
    Dim sum3 As Double = dt.Compute("Sum(副科配备)",Filter)
    Dim sum4 As Double = dt.Compute("Sum(实际副科)",Filter)
    Dim s1 As String = dt.GetComboListString("正科职数空缺", filter).replace("|", ",").trim(",")
    Dim s2 As String = dt.GetComboListString("正科职数备注", filter).replace("|", ",").trim(",")
    Dim s3 As String = dt.GetComboListString("副科职数空缺", filter).replace("|", ",").trim(",")
    Dim s4 As String = dt.GetComboListString("副科职数备注", filter).replace("|", ",").trim(",")
    Dim s5 As String = dt.GetComboListString("下属部门", filter).replace("|", ",").trim(",")
    Dim jg As String = dt.GetComboListString("下属部门", filter & " and 单位性质 = '事业'")
    s1 = iif(s1 > "",  "正科职数空缺:" & s1, "")
    s2 = iif(s2 > "",  "正科职数备注:" & s2, "")
    s3 = iif(s3 > "",  "副科职数空缺:" & s3, "")
    s4 = iif(s4 > "",  "副科职数备注:" & s4, "")
    Dim s8 As String = dt.GetComboListString("下属部门", filter & " and 单位性质 = '机关'").replace("|", ",").trim(",")
    Dim s9 As String = dt.GetComboListString("下属部门", filter & " and 单位性质 = '参公事业'").replace("|", ",").trim(",")
    Dim s10 As String= dt.GetComboListString("下属部门", filter & " and 单位性质 = '事业'").replace("|", ",").trim(",")
    Dim s7 As String = ""
    s7 &= iif(s8 > "", "机关:" & s8, "")
    s7 &= iif(s9 > "", "参公事业::" & s9, "")
    s7 &= iif(s10 > "", "事业:" & s10, "")
    e.Book.Marks("分组统计字符") = "单位:" & e.DataRow("单位名称") & "(" & s7.Trim() & ")" & Chr(13) & Chr(10) & " 正科配备:" & sum1 & " 实际正科:" & sum2 & " " & s1 & " " & s2 & Chr(13) & Chr(10) & " 副科配备:" & sum3 & " 实际副科:" & sum4 & " " & s3 & " " & s4
End Select

 回到顶部