Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
terezagr
Partner - Creator III
Partner - Creator III

Macro not working on server after upgrading to 11.2 SR9

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.

1 Solution

Accepted Solutions
terezagr
Partner - Creator III
Partner - Creator III
Author

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!

View solution in original post

16 Replies
cesaraccardi
Specialist
Specialist

Hi,

I would suggest to check the security settings of QVS. You can do that using QMC:

qmc macro.png

jerrysvensson
Partner - Specialist II
Partner - Specialist II

What macro are you using?

terezagr
Partner - Creator III
Partner - Creator III
Author

Cesar, I am afraid that Allow Unsafe macro execution on server is not solving the issue

terezagr
Partner - Creator III
Partner - Creator III
Author

sub SwitchToFinancialSelections

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

  ' Set variable for show conditions

  set v = ActiveDocument.Variables("vSelectionType")

  v.SetContent "F",true

end sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

sub SwitchToDateRangeSelections

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

  ' Set variable for show conditions

  set v = ActiveDocument.Variables("vSelectionType")

  v.SetContent "DATE",true

end sub

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

' if the user is on the bm page, set the flag to 1.

if ActiveDocument.ActiveSheet.GetProperties.Name = "BM" Then

'make sure that we only have a single value in Period_Month selected (if it is a range, select the last)

  c = ActiveDocument.Variables("vMaxPeriodMonth").GetContent.String

  ActiveDocument.Fields("Period_Mon").Clear

  ActiveDocument.Fields("Period_Mon").Select "*"&c&"*"

  'Update the flag, so we know the user is on this page.

  b.SetContent "1",true

end if

end

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Strange.

We are actually doing the same 11 SR2 -> 11.2 SR9 at this moment. Almost all apps have macros.

First tests looks fine. We have similar Show/hide macros, also using ActiveSheet property.

terezagr
Partner - Creator III
Partner - Creator III
Author

what kind of settings do you have on your qvws? Is everything working fine for you in Web View? Do you also use Section Access in your apps?

I have tried following document settings, but all seem not to work in web view:

1. Macro override security = did not work at all

2. Admin override security = it did work when selecting the maxPeriod Month, but than break it when selecting the range

cesaraccardi
Specialist
Specialist

What about the security settings on the edit module window of your document? Is it set to 'System Access'/'Allow System Access'?

jerrysvensson
Partner - Specialist II
Partner - Specialist II

We only use WebView.

Section access in all apps.

We have both, Macro and Admin override security.

terezagr
Partner - Creator III
Partner - Creator III
Author

System Access/Allow System Access - problem still occurs

If I apply both Macro and Admin override security - problem still occurs