当前位置:首页 > Windows程序 > 正文

datawindow.net 动态按条件汇总字段值

2021-03-27 Windows程序

string xblx = dw1.GetItemString(row, "c_xblx"); string xbid = dw1.GetItemString(row, "c_xbid"); string express = "evaluate(‘sum(if(c_xblx=\"" + xblx + "\"" + " and " + "c_xbid=\"" + xbid + "\", d_cfmj, 0) for all)‘,1)"; string cfmjstr = dw1.Describe(express); double cfmj = 0; Double.TryParse(cfmjstr, out cfmj);

  

express 表达式结果如下:

evaluate(‘sum(if(c_xblx="xbm" and c_xbid="14330", d_cfmj, 0) for all)‘,1)

  

datawindow.net 动态按条件汇总字段值

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/68764.html