以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]数据转换 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=172013) |
-- 作者:lgj716330 -- 发布时间:2021/9/18 8:59:00 -- [求助]数据转换 Dim gzs() As String ={e.Form.Controls("dgzh").value} for each gz as string in gzs b.Filter = "摘要 like \'%" & gz & "%\'" next dgzh中有好几个项目,结果只取了其中一个,要怎么调整
|
-- 作者:有点蓝 -- 发布时间:2021/9/18 9:03:00 -- Dim gzs() As String ={e.Form.Controls("dgzh").value} dim s as string = "1=2 " for each gz as string in gzs s = s & " or 摘要 like \'%" & gz & "%\'" next b.Filter = s |
-- 作者:lgj716330 -- 发布时间:2021/9/18 12:44:00 -- 嗯,改成这样,可以了 Dim gzs As List(Of String) gzs = DataTables("列表项目").GetValues("摘要","摘要 <> \'\'") Dim s As String = "1=2" For i As Integer = 0 To gzs.count -1 s= s & " Or (摘要 Like \'%" & gzs(i) & "%\' and 年份=" & N1 & " And 月份 = " & Y1 & "" Next |