易表在线答疑技术与交流用户社区 → [求助]请版主帮忙


  共有15553人关注过本帖树形打印复制链接

主题:[求助]请版主帮忙

帅哥哟,离线,有人找我吗?
惊堂木
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:4 积分:0 威望:0 精华:0 注册:2006/8/22 11:08:00
[求助]请版主帮忙  发帖心情 Post By:2006/8/22 11:53:00 [只看该作者]




-=-=-=- 以下内容由 惊堂木2006年08月22日 11:54am 时添加 -=-=-=-
哪位大侠知道这个问题怎么解决?我的易表是1708

 回到顶部
帅哥哟,离线,有人找我吗?
smileboy
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:8672 积分:1734 威望:0 精华:0 注册:2006/8/11 10:52:00
  发帖心情 Post By:2006/8/22 12:02:00 [只看该作者]

是否存在函数嵌套问题

 回到顶部
帅哥哟,离线,有人找我吗?
惊堂木
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:4 积分:0 威望:0 精华:0 注册:2006/8/22 11:08:00
  发帖心情 Post By:2006/8/22 12:17:00 [只看该作者]

公式比较长。请问是嵌套错误造成的吗?

 回到顶部
帅哥哟,离线,有人找我吗?
czy
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13147 积分:-89 威望:0 精华:0 注册:2006/8/11 11:14:00
  发帖心情 Post By:2006/8/22 12:19:00 [只看该作者]

看你出错的图片应该是函数嵌套引起的,你可以将公式贴上来看看。

 回到顶部
帅哥哟,离线,有人找我吗?
惊堂木
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:4 积分:0 威望:0 精华:0 注册:2006/8/22 11:08:00
  发帖心情 Post By:2006/8/22 12:27:00 [只看该作者]

if([%主合同名称%] = "" , msgbox("主合同名称不能为空", 0),RecalcGrid(GridName) and showallrows() and if(LocateFor("合同名称"," = ",[%主合同名称%]) > 0,SetVariable("%个总%",CountFor("合同表","主合同名称"," = ",[%主合同名称%],"附属合同","= ",- 1)) and SetVariable("%金总%",SumFor("合同表","合同总金额","主合同名称"," = ",[%主合同名称%],"附属合同","= ",- 1))and SetVariable("%项目金额%",SumFor("合同表","合同总金额","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","收入")) and SetVariable("%个材%",CountFor("合同表","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","材料采购")) and SetVariable("%金材%",SumFor("合同表","合同总金额","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","材料采购")) and SetVariable("%个安%",CountFor("合同表","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","安装合同")) and SetVariable("%金安%",SumFor("合同表","合同总金额","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","安装合同"))  and SetVariable("%个分%",CountFor("合同表","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","分包")) and SetVariable("%金分%",SumFor("合同表","合同总金额","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","分包"))  and SetVariable("%个管%",CountFor("合同表","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","项目管理")) and SetVariable("%金管%",SumFor("合同表","合同总金额","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","项目管理"))  and SetVariable("%个其%",CountFor("合同表","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","其它")) and SetVariable("%金其%",SumFor("合同表","合同总金额","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","其它"))and SetVariable("%个挂%",CountFor("合同表","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","挂靠成本")) and SetVariable("%金挂%",SumFor("合同表","合同总金额","主合同名称"," = ",[%主合同名称%],"合同分类_三级"," = ","挂靠成本")),MsgBox("没有找到符合条件的行!",0)))

 回到顶部
帅哥哟,离线,有人找我吗?
czy
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13147 积分:-89 威望:0 精华:0 注册:2006/8/11 11:14:00
  发帖心情 Post By:2006/8/22 12:31:00 [只看该作者]

SetVariable("%个总%",CountFor("合同表","主合同名称"," = ",[%主合同名称%],"附属合同","= ",- 1) )

将红色部分改成表达式变量即可。
具体可参看帮助一个麻烦的问题。


 回到顶部
帅哥哟,离线,有人找我吗?
惊堂木
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:4 积分:0 威望:0 精华:0 注册:2006/8/22 11:08:00
  发帖心情 Post By:2006/8/22 12:44:00 [只看该作者]

谢谢CZY版主!!“表达式变量”?我还是不太明白,能否讲得详细点?我的易表知识很久没更新了。:)

 回到顶部
帅哥哟,离线,有人找我吗?
czy
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13147 积分:-89 威望:0 精华:0 注册:2006/8/11 11:14:00
  发帖心情 Post By:2006/8/22 12:53:00 [只看该作者]

就是增加一个表达式变量,比如是%A%,然后把上述公式的红色部分贴到变量的表达式/候选值中,最后把上述公式改成:SetVariable("%个总%",[%A%])就可以了。

5楼公式中所有SetVariable中赋值部份均要改。


 回到顶部