Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
we have just recently upgraded to 11.2 SR9. I have inherited an application that has a macro built in it. This macro works fine in Qlikview Client, but does not work ok in WebView and on Server 11.2. SR9.
Funny thing is, that the same macro works on QV 11.2 SR2. Same settings, same variables used - and it is working fine!
All suggestions what I might try to do are welcomed!
T.
On which line does it break?
It breaks on this line in web view:
sub SelectFiscalPeriodRange
set b = ActiveDocument.Variables("vBMTabSelected")
v = ActiveDocument.Variables("vPeriod_Fiscal").GetContent.String
if v <> "-" and b.GetContent.String = 1 Then
search = "<=" & v
ActiveDocument.Fields("Period_Mon").Clear
ActiveDocument.Fields("Period_Fis").Select search
ActiveDocument.Fields("Period_Mon").SelectPossible
ActiveDocument.Fields("Period_Fis").Clear
b.SetContent "0",true
End If
It selects the Max Period Month fine on BM tab, then when i go to next tab where should be selected the period range - there is only selected again Max Period Month. Then I go onto next tab in the app (again there should be the period range) and that is when the pop up message appears saying: Unexpected exception occured!
***This has been tested in Web View
Comment out all lines and then add one at a time to see where it fails.
Like:
set b = ActiveDocument.Variables("vBMTabSelected")
'v = ActiveDocument.Variables("vPeriod_Fiscal").GetContent.String
'if v <> "-" and b.GetContent.String = 1 Then
'search = "<=" & v
' ActiveDocument.Fields("Period_Mon").Clear
' ActiveDocument.Fields("Period_Fis").Select search
' ActiveDocument.Fields("Period_Mon").SelectPossible
' ActiveDocument.Fields("Period_Fis").Clear
' b.SetContent "0",true
'End If
Jerry, I have tried and it seems to cause the error from this point:
ActiveDocument.Fields("Period_Month").SelectPossible
ActiveDocument.Fields("Period_Fiscal").Clear
b.SetContent "0",true
Any suggestions? The SelectPossible seems not to work
Not really.
I would create a test app and try SelectPossible in that. To make sure it is a bug and not a problem in the datamodel.
Seems like the problem is some setting in my Qlikview. I have just asked my colleague to test it in the same version of QV and the macro error message was not coming up for her and all worked fine.
I have double checked with her the document properties and module settings and all seems to be the same..
My colleague pointed me to this direction: http://community.qlik.com/thread/122491
This worked for me too! After removing multiple boxes and current selections boxes and replacing these in the new version of QV - all worked fine! (all tested in WebView, Client, Browser)
Thank you all for your help!