Foxtable(狐表)用户栏目专家坐堂 → 数组内部函数的使用方法


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

主题:数组内部函数的使用方法

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


加好友 发短信
等级:小狐 帖子:376 积分:4189 威望:0 精华:0 注册:2008/9/1 14:18:00
数组内部函数的使用方法  发帖心情 Post By:2012/11/15 16:56:00 [显示全部帖子]

DataTables("成绩库").StopRedraw
Dim s1() As String = New String() {"总分"}
Dim dt As Table = Tables("成绩库")
StatusBar.Message1= "正在生成统计数据"
StatusBar.ProgressBar.Visible =True
StatusBar.ProgressBar.Minimum = 0
StatusBar.ProgressBar.Maximum =DataTables("成绩库").datarows.count
For i As Integer = 0 To DataTables("成绩库").Datarows.count - 1
    StatusBar.ProgressBar.Value = i + 1
    StatusBar.Message2= "已筛选记录" & i + 1 & "条"
    StatusBar.Refresh()
Next
Functions.Execute("排名",s1,Tables("成绩库"))
Functions.Execute("总分段",s1,"")
Functions.Execute("分段统计",s1,dt)
Functions.Execute("清零",s1,"")
DataTables("成绩库").ResumeRedraw

Dim Kms() As String = Args(0) ‘内部函数名分段统计
Dim dt As Table = Args(1)
Dim lms() As String = {"总分00分及以上","总分01分及以上","总分02分及以上","总分03分及以上","总分04分及以上","总分05分及以上","总分06分及以上","总分07分及以上","总分08分及以上","总分09分及以上"}
For Each Km As String In Kms
    For Each dr As DataRow In DataTables(Km & "1分段").DataRows
        For Each lm As String In lms
            dr(lm) = dt.DataTable.Compute("Count(姓名)", "[" & km & "] >= '" & dr("分数段") + Val(lm.SubString(2,2)) & "'")
        Next
    Next
Next

 回到顶部