以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 统计null值 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=87246) |
||||
-- 作者:czquickly -- 发布时间:2016/7/6 14:33:00 -- 统计null值 窗口里做条件统计。 统计0或者NULL值,不能正确显示。 ![]() ![]() Dim L1 As Integer L1 = DataTables("表A").Compute("Count([第一列])", "第一列 = IsNull(第一列,0)") e.form.Controls("Label5").Text = L1 & "个" Dim L2 As Integer L2 = DataTables("表A").Compute("Count([第一列])", "第一列 < 1 And " & "第一列 > 0" ) e.form.Controls("Label6").Text = L2 & "个" Dim L3 As Integer L3 = DataTables("表A").Compute("Count([第一列])", "第一列 = 1") e.form.Controls("Label4").Text = L3 & "个"
代码需要如何修改
|
||||
-- 作者:大红袍 -- 发布时间:2016/7/6 14:46:00 -- L1 = DataTables("表A").Compute("Count([第一列])", "第一列 = IsNull(第一列,0)")
改成
L1 = DataTables("表A").Compute("Count([_Identify])", "第一列 is null") |
||||
-- 作者:czquickly -- 发布时间:2016/7/6 15:15:00 -- 大红袍老师的解答总是这么的完美 ![]() [此贴子已经被作者于2016/7/6 15:15:55编辑过]
|