QlikView 重新启动后 DynamicUpdateCommand 停止工作
我以这种方式在宏内使用DynamicUpdateCommand
:
sub addOrder
set choosen = ActiveDocument.Fields("NUMORD").GetPossibleValues
for i = 0 to choosen.Count - 1
set result = ActiveDocument.DynamicUpdateCommand("UPDATE * SET CHOOSE = 'S' WHERE NUMORD = '" & choosen.Item(i).text & "' " )
if result = false then
MsgBox result.ErrorMessage
end if
next
end sub
启用动态数据更新。
它可以工作,但是,当我关闭 QlikView 并重新打开它时,它就不再工作了。即使尝试重新加载。
我凭经验意识到,要使其再次工作,我需要单击“保存”按钮,即使不更改任何内容......
我该如何解决这个小问题?也许它与 RAM 以及将 .qvw 文件保存到文件系统的方式有关?
非常感谢!
I'm using DynamicUpdateCommand
inside a macro in this way:
sub addOrder
set choosen = ActiveDocument.Fields("NUMORD").GetPossibleValues
for i = 0 to choosen.Count - 1
set result = ActiveDocument.DynamicUpdateCommand("UPDATE * SET CHOOSE = 'S' WHERE NUMORD = '" & choosen.Item(i).text & "' " )
if result = false then
MsgBox result.ErrorMessage
end if
next
end sub
Dinamic Data Update is enabled.
It works, but, when I close QlikView and reopen it, it doesn't work anymore. Even if try reloading.
I empirically realized that to make it work again I need to click the "Save" button, even without changing anything...
How can I solve this little issue? Maybe is it connected with RAM and way of saving .qvw file to the file system?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在没有任何其他解决方案的情况下,我以这种解决方法结束,它在打开文档时以编程方式保存文档:
工具 >编辑模块...:添加此子例程:
它可以工作,但最好有更好的解决方案。
Without any other solution I ended with this workaround, which saves the document programmatically on document opening:
Tools > Edit Module...: add this subroutine:
It works, though a better solution would be preferred.
从版本 11 开始,动态更新可以作为操作完成,而不是通过 VB 宏。最好尽可能使用操作。然而,有时即使使用动态更新操作,我也注意到冻结类似于您所描述的情况。我最终在动态更新之后又添加了一个虚拟操作(例如,为虚拟变量分配一个值或添加选择 -> 返回操作来补偿触发OnSelect)。
Starting from version 11 Dynamic Update can be done as Actions rather than through VB macro. It is preferable to use Actions when possible. However, sometimes even using Dynamic Update action I noticed freezes similar to what you described. I ended up adding one more dummy action right after Dynamic Update (e.g. assigning a value to dummy variable or adding Selection -> Back action to compensate triggering OnSelect).