Foxtable(狐表)用户栏目专家坐堂 → 单元格数据给值,引用求助


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

主题:单元格数据给值,引用求助

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


加好友 发短信
等级:四尾狐 帖子:843 积分:5982 威望:0 精华:0 注册:2013/6/29 9:36:00
单元格数据给值,引用求助  发帖心情 Post By:2017/10/8 15:29:00 [只看该作者]

Dim tb As DataTable =DataTables("资产负债表")
Dim tb2 As DataTable = DataTables("总分类账")
Dim qj As String = Vars("会计期间")

Dim strs1() As String = {"货币资金"}
Dim strs2() As String = {"strs2(1)"}
Dim x() As String = {"0"}
Dim y() As String = {"6"}
'Dim strs2() As String = {}
'会计科目中提取'货币资金'的科目代码
For i As Integer = 0 To strs1.Length-1
    Dim lst As List(of String) = DataTables("会计科目").GetValues("科目代码","资产负债表 like '" & strs1(i) & "%' or 资产负债表 like '%" & strs1(i) & " '")
    Dim str As String
    For Each ids As String In lst
        str & =  ids & ","
    Next
'msgbox(1)
    str = str.Trim(",")
'msgbox(2)
    Dim n As Double  = tb2.sqlCompute("sum(余额)","科目代码 in (" & str & ") And  摘要 = ' 本 年 累 计' and 会计期间 = '" & Vars("会计期间") & "' ")
'msgbox(3)

    Dim r As Integer =CInt(x(i))
    Dim Cl As Integer =CInt(y(i))
    output.show(cl)
    tb(r,cl)=n
'msgbox(4)
'output.show(x)
'output.show(strs2(i))
Next

红色部分,要怎么写才不出错呢?


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


加好友 发短信
等级:四尾狐 帖子:843 积分:5982 威望:0 精华:0 注册:2013/6/29 9:36:00
  发帖心情 Post By:2017/10/8 15:35:00 [只看该作者]

知道问题了。table ,datatable的事儿。

 回到顶部