以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 统计问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=5669) |
-- 作者:czy -- 发布时间:2009/12/28 1:31:00 -- b.Totals.AddExp("出苗总数","[公雏]+[母雏]+[次苗]+[死残苗]") 没发现问题呀。 |
-- 作者:mr725 -- 发布时间:2009/12/28 14:21:00 -- b.Totals.AddExp("健雏率","iif(([公雏] is null,0,[公雏])+iff([母雏] is null,0,[母雏]))/iif(([公雏] is null,0,[公雏])+iff([母雏] is null,0,[母雏])+iif([次苗] is null,0,[次苗])+iif([死残苗] is null,0,[死残苗]))") 全角 半角? |
-- 作者:czy -- 发布时间:2009/12/29 0:14:00 -- Dim b As New SQLGroupTableBuilder("统计表1","fh") b.Groups.AddDef("批次") b.Groups.AddDef("日期",DateGroupEnum.month, "月") b.Totals.AddDef("实孵数量") b.Totals.AddDef("公雏") b.Totals.AddDef("母雏") b.Totals.AddDef("次苗") b.Totals.AddDef("死残苗") b.Totals.AddExp("出苗总数","iif([公雏] is null,0,[公雏])+iif([母雏] is null,0,[母雏])+iif([次苗] is null,0,[次苗])+iif([死残苗] is null,0,[死残苗])") b.Totals.AddExp("健雏率", "iif([公雏] is null And [母雏] is null And [次苗] is null And [死残苗] is null,0,(iif([公雏] is null,0,[公雏])+iif([母雏] is null,0,[母雏]))/(iif([公雏] is null,0,[公雏])+iif([母雏] is null,0,[母雏])+iif([次苗] is null,0,[次苗])+iif([死残苗] is null,0,[死残苗])))",AggregateEnum.Average) b.Decimals=3 b.Build Tables("窗口1_Table1").DataSource = DataTables("统计表1") |