以文本方式查看主题

-  易表在线答疑  (http://egrid2000.com/dvbbs/index.asp)
--  用户社区  (http://egrid2000.com/dvbbs/list.asp?boardid=2)
----  请帮忙简化一下公式  (http://egrid2000.com/dvbbs/dispbbs.asp?boardid=2&id=7478)

--  作者:zhou5539011
--  发布时间:2007/4/17 11:32:00
--  请帮忙简化一下公式
if([%季度%]=1,SumFor("送货明细","数量","规格","=",[规格],"季度","=","1"),
if([%季度%]=2,SumFor("送货明细","数量","规格","=",[规格],"季度","=","1")+SumFor("送货明细","数量","规格","=",[规格],"季度","=","2"),
if([%季度%]=3,SumFor("送货明细","数量","规格","=",[规格],"季度","=","1")+SumFor("送货明细","数量","规格","=",[规格],"季度","=","2")+SumFor("送货明细","数量","规格","=",[规格],"季度","=","3"),
if([%季度%]=4,SumFor("送货明细","数量","规格","=",[规格],"季度","=","1")+SumFor("送货明细","数量","规格","=",[规格],"季度","=","2")+SumFor("送货明细","数量","规格","=",[规格],"季度","=","3")+SumFor("送货明细","数量","规格","=",[规格],"季","=","4"),true))))
--  作者:Czy
--  发布时间:2007/4/17 11:42:00
--  
这样?

SumFor("送货明细","数量","规格","=",[规格],"季度","<=",[%季度%])


--  作者:zhou5539011
--  发布时间:2007/4/17 11:48:00
--  
是的,谢谢
--  作者:小兀
--  发布时间:2007/4/22 20:26:00
--  
我太崇拜总版主了。