Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Switch between normal mode and web mode

Hi

I am working on a qvw where in first sheet needs to be in normal mode and the second sheet needs to be in web mode because i am showing webpage viewer extension object in second sheet. when we navigate to second sheet it should automatically switch to web mode. is it possible in qlikview through any script or macro or actions.

Thanks in Advance

Hari

11 Replies
Not applicable
Author

Hi Sasi Vardhan,

Thanks for your response,

I am following the below approach, i am setting action to second sheet.

Settings--->Sheet Properties--->Triggers--->OnActivateSheet--->AddActions--->Run Macro--->

macro code:

set docprop = ActiveDocument.GetProperties

docprop.UseAjaxUI = true

ActiveDocument.SetProperties docprop

ActiveDocument.DoReload 2, true   

But the changes are reflecting for the entire document and not to particular sheet  and only when the qvw is closed and opened once again.

Thanks

Hari

Not applicable
Author

Hi Hari,

It's a bit of a hack, but there is a way to automatically activate the WebView for individual tabs by emulating the necessary key strokes via a macro.

The macro code looks like this:

sub toggleWebMode

    Dim WshShell

  

    Set WshShell = CreateObject("wscript.Shell")

    WshShell.SendKeys "%(V) U" 'Simulate Alt+V U

end sub

Simply add the macro to both the OnActivateSheet and OnLeaveSheet triggers for the WebView sheets, and you should be good to go.

This will not work if the QlikView interface language is not set to English (in this case, you'll need to adjust the SendKeys commands).

Also, if the user happened to be pressing a key while switching to the sheet, it might cause the activation of the WebView to fail.