Foxtable(狐表)用户栏目专家坐堂 → [求助]统计数据


  共有1812人关注过本帖平板打印复制链接

主题:[求助]统计数据

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


加好友 发短信
等级:九尾狐 帖子:2927 积分:20167 威望:0 精华:0 注册:2012/2/3 17:45:00
[求助]统计数据  发帖心情 Post By:2015/12/29 13:28:00 [只看该作者]

老师,

DataTables("合成_table2").DataRows.Clear
DataTables("合成_table1").Save
For Each dr As DataRow In DataTables("合成_table1").dataRows
    If dr.IsNull("第一列")=True Then
        dr.Delete                                                                            ‘去除空值
    End If
Next

Dim fh As WinForm.TextBox = e.Form.Controls("TextBox1")                                                             ‘指定连接符号
Dim len As WinForm.NumericComboBox = e.Form.Controls("NumericComboBox1")                                  ’指定每行多少个
Dim ns() As String
Dim bt,bt1 As String
Dim i,i1 As Integer
Dim len1 As Integer
'len1=DataTables("合成_table1").Compute("Count([第一列])", "第一列 <> ' '")

If fh.Text<>"" AndAlso len.Value >0 AndAlso DataTables("合成_table1") IsNot Nothing Then
    For Each dr As DataRow In DataTables("合成_table1").dataRows
        If dr.IsNull("第一列")=False Then
            bt &= "," & dr("第一列")                                                                                    ’和成字符串,例如 1,2,3,4,5,
        Else
            MessageBox.Show("请填写要合成的code!")
            Exit For
        End If
    Next
    If bt.Length>0 Then
        ns=bt.SubString(1).split(",")
        For i=0 To ns.Length-1 Step 14 'len.Value
            ’bt1 &=bt1 & ns(i)
            Tables("合成_table2").AddNew()
            Tables("合成_table2").Current("第一列")=bt.TrimStart(",").SubString(i,len.Value)                       ‘想要生成表的每一行,这块怎么写呢
        Next
    End If
Else

 回到顶部