以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]点击目录树个别数据不能加载 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=193735) |
-- 作者:dahai -- 发布时间:2024/10/9 0:24:00 -- [求助]点击目录树个别数据不能加载 老师您好,我用的阿里云。问题描述:大概有100多家供应商,2700行数据,点击case0、case1可以加载所有数据,点击case2和case3,只有一个供应商的4行数据加载不了,点击其他供应商都没有问题。请老师帮我看看,谢谢! 窗口afterload 代码如下 Dim jycmd As New SQLCommand Dim jydt As DataTable jycmd.C onne ctionNam e = "****" jycmd.CommandText = "SELECT DISTINCT Year(入库日期) As 年,Month(入库日期) As 月,供应商,单号 Fro m {入库明细}" jydt = jycmd.ExecuteReader() Dim jytrv As WinForm.TreeView = e.Form.Controls("tvjy") jytrv.BuildTree(jydt, "年|月|供应商|单号") DataTables("入库明细").LoadFilter = "_identify is null" DataTables("入库明细").Load nodemouseclick 事件代码如下: Dim dr As DataRow = e.Node.DataRow Dim FL As String Dim Year As Integer = dr("年") Dim Month As Integer = dr("月") Dim gy As String = dr("供应商") Dim xh As String = dr("单号") Select Case e.Node.Level Case 0 FL = "Year(入库日期) = " & Year & "" Case 1 FL = "Year(入库日期) = " & Year & " And Month(入库日期) = " & Month & "" Case 2 FL = "Year(入库日期) = " & Year & " And Month(入库日期) = " & Month & " And 供应商 = \'" & gy & "\' " Case 3 FL = "Year(入库日期) = " & Year & " And Month(入库日期) = " & Month & " And 供应商 = \'" & gy & "\' And 单号 = \'" & xh & "\'" End Select DataTables("入库明细").LoadTop = Nothing DataTables("入库明细").LoadFilter = FL DataTables("入库明细").Load()
[此贴子已经被作者于2024/10/9 0:25:58编辑过]
|
-- 作者:有点蓝 -- 发布时间:2024/10/9 11:13:00 -- 应该是数据有问题,可能这4行的供应商有空格等看不见的字符 |
-- 作者:dahai -- 发布时间:2024/10/10 21:34:00 -- 谢谢老师,确实是空格的问题 |