以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- Filter 条件编写 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=79115) |
-- 作者:lgj716330 -- 发布时间:2015/12/24 15:28:00 -- Filter 条件编写 Dim Filter As String \'设置筛选条件 With e.Form.Controls("DW") If .Value IsNot Nothing Then Filter = "所属单位 = \'" & .Value & "\'" End If End With With e.Form.Controls("YF") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "所属日期 = #" & .Value & "#" End If End With Dim bd2 As New SQLgroupTableBuilder("统计表2","部门损益总账") Dim dt2 As fxDataSource bd2.AddTable("部门损益总账","部门名称","部门档案","部门名称") \'添加统计表 bd2.AddTable("部门损益总账","科目名称","科目档案","科目名称") \'添加统计表 bd2.Groups.AddDef("所属单位") bd2.Groups.Adddef("所属日期",DateGroupEnum.none) bd2.Groups.AddDef("一级科目") bd2.Totals.AddDef("借方发生") bd2.Filter = "一级科目 = \'主营业务收入\'" bd2.Filter = Filter 请问这里的两个条件如何组合 |
-- 作者:大红袍 -- 发布时间:2015/12/24 15:31:00 -- Dim Filter As String = "1=1" \'设置筛选条件 Dim bd2 As New SQLgroupTableBuilder("统计表2","部门损益总账") bd2.Filter = "一级科目 = \'主营业务收入\' and (" & filter & ")" |
-- 作者:lgj716330 -- 发布时间:2015/12/24 15:34:00 -- 好的,谢谢 |