以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  条件筛选求和  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=107846)

--  作者:kaituozhe
--  发布时间:2017/10/11 12:05:00
--  条件筛选求和

想以下形式作为条件,实现求和,提示错误,可以这样吗?不使用循环。

Dim JYHDLC As String = "现流项目 in {\'购买原材料商品接受劳务支付的现金\',\'支付的职工薪酬\',\'支付的税费\',\'支付其他与经营活动有关的现金\'} and 会计年度 = \'" & e.DataRow("会计年度") & "\' And 期间 = \'" & e.DataRow("期间") & "\'And 公司名称 = \'" & e.DataRow("公司名称") & "\'And 会计准则 = \'" & e.DataRow("会计准则") & "\'   "
   


--  作者:有点甜
--  发布时间:2017/10/11 12:19:00
--  

Dim JYHDLC As String = "现流项目 in (\'购买原材料商品接受劳务支付的现金\',\'支付的职工薪酬\',\'支付的税费\',\'支付其他与经营活动有关的现金\') and 会计年度 = \'" & e.DataRow("会计年度") & "\' And 期间 = \'" & e.DataRow("期间") & "\'And 公司名称 = \'" & e.DataRow("公司名称") & "\'And 会计准则 = \'" & e.DataRow("会计准则") & "\'   "