易表在线答疑技术与交流用户社区 → 请求帮助-自定义打印按钮


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

主题:请求帮助-自定义打印按钮

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


加好友 发短信
等级:论坛游民 帖子:133 积分:535 威望:0 精华:0 注册:2006/8/18 12:44:00
请求帮助-自定义打印按钮  发帖心情 Post By:2013/6/22 11:05:00 [显示全部帖子]

这是一个自定义按钮的公式,点击按钮不执行相关操作,请求各位看看下面公式错在哪里:

 

CopyFor("备款单","用户索引号","用户索引号","B","=","0","A", "=" ,[%A%],"收与否","=","0") And

--------将当前表中符合条件的行的"用户索引号"复制到表"备款单"中

 

DelReptRows("备款单","用户索引号") And

--------删除表"备款单"中"用户索引号"重复的行

 

SetVariable("%打印页%",CountFor("备款单","B", "=" ,"0")) And

--------统计表"备款单"中待打印的行数

Loop("[B] = 0","Move(1,5) And SetVariable(""%索引号%"",FindText(""备款单"",""用户索引号"",""B"", ""="" ,"""")) And

FilterFor(""用户索引号"", ""="" ,[%索引号%],""B"",""="",""0"",""收与否"",""="",""0"") And

Report(""水费计算"",""水电费备款通知单1"",1,Rows,1) And

ReplaceFor(""备款单"",""B"", -1,""用户索引号"", ""="" ,[%索引号%]) And

DelFor(""备款单"",""B"", ""="" ,-1) And ShowAllRows() And

SetVariable(""%索引号%"","""")",Number([%打印页%]))

--------执行循环


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


加好友 发短信
等级:论坛游民 帖子:133 积分:535 威望:0 精华:0 注册:2006/8/18 12:44:00
  发帖心情 Post By:2013/6/22 17:09:00 [显示全部帖子]

CopyFor("备款单","用户索引号","用户索引号","B","=","0","A", "=" ,[%A%],"收与否","=","0") And
DelReptRows("备款单","用户索引号") And

SetVariable("%打印页%",CountFor("备款单","B", "=" ,"0")) And

Loop("[B] = 0","SetVariable(""%索引号%"",FindText(""备款单"",""用户索引号"",""B"", ""="" ,""0"")) And

FilterFor(""用户索引号"", ""="" ,[%索引号%],""B"",""="",""0"",""收与否"",""="",""0"") And

Report(""水费计算"",""水电费备款通知单1"",1,Rows,1) And

ReplaceFor(""备款单"",""B"", -1,""用户索引号"", ""="" ,[%索引号%]) And

DelFor(""备款单"",""B"", ""="" ,-1) And

SetVariable(""%索引号%"","""") And ShowAllRows()",Number([%打印页%]))

 

去掉循环可以打印,加入循环就没反应了


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


加好友 发短信
等级:论坛游民 帖子:133 积分:535 威望:0 精华:0 注册:2006/8/18 12:44:00
  发帖心情 Post By:2013/6/24 22:17:00 [显示全部帖子]

是不是问题出在这里:"[B] = 0" ?[B]是一逻辑列

 回到顶部