码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2015-08-06 20:23:37      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:

 

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 动态按条件汇总字段值

标签:

原文地址:http://www.cnblogs.com/janehlp/p/4708919.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!