Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why macro doesn't work in webview

Hi, people.


I had a bad surprise when I put my dashboard to work in WebView: the actions that call macros doesn't work.

They just disappear when I select that mode. See bellow...


MacroProblem01.png

Thanks for any help.

...

Ricardo Ildefonso

Brasil

13 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Macros do not work in Ajax, because in the portal there is no VBScript interpreter (imagine opening this QVW on a Mac in Safari)

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You can get them to work all right, if you restrict the set of possible QlikView client applications to QV Desktop (Open In Server) and QlikView Plug-in for IE.

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Some macro's may work on the server side (always a windows server) if you restrict yourself to non-client, non-UI related operations. See the QlikView Reference Manual  Chapter 80 - Using Macros in QV Documents on the QV-Server.

Good luck,

Peter

Not applicable
Author

Ok...

And what happens if I re-write my code in JavaScript?

This could be useful?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes, but that may not fix your problem. Your translations will still be executed as server-side macro's.

ashfaq_haseeb
Champion III
Champion III

Hi,

what are you trying to do.

may be you can use EDX to trigger a macro.

Regards

ASHFAQ

Not applicable
Author

I am change the containers' tab index through the buttons.

First one, I attribute the value of variable admContainerToFocus. It will set the name of container control and the index to be actived.

So, I call the macro without parameters, which will call the final procedure. This is the code:

'-----------------------------------------------------

' Set focus to a tab inside Container - Caller

Sub FocusTabContainer ()

    On Error Resume Next

    Set admCTF = ActiveDocument.GetVariable("admContainerToFocus")

    admFocusTabContainer Split(admCTF.GetContent.String, ",")

End Sub

'-----------------------------------------------------

' Set focus to a tab inside Container

Sub admFocusTabContainer(vParam)

    Container = vParam(0)

    Index = vParam(1)

    NewIndex = 0

    Set ContainerObj = ActiveDocument.GetSheetObject(Container)

    Set ContProp=ContainerObj.GetProperties

    On Error Resume Next

    x = Int(Index) + 2

    If err = 0 and x > 0 Then

        NewIndex = x - 2

    Else

        i = ContProp.ContainedObjects.Count - 1

        For i = 0 To i

            If ContProp.ContainedObjects.Item(i).Text.v = Index Then

                NewIndex = i

            End If

        Next

    End If

    On Error Goto 0

    Set d = ActiveDocument.GetVariable("admDEBUG")

    d.SetContent dbg, True

    ContProp.SingleObjectActiveIndex = NewIndex

    ContainerObj.SetProperties ContProp

End Sub

Thanks.

...

Ricardo

Anonymous
Not applicable
Author

Chapter 8...

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I don't know what you mean. Chapter 8 is about the Getting Started Wizard.

Nowadays it's Chapter 81 - Using Macros in QV Documents on the QV-Server