Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I've got a problem with a macro which should open a specific sheet of another dashboard.
In my first dashboard I have a button by which I use a trigger with the action "open qlikview document" to open my second dashboard. So far it works.
Now I want my second dashboard to be opened and also a specific sheet of it. So I searched for a macro which is able to do that.
SUB OpenSH11MarketShareSwitzerland
set app=activedocument.getapplication
set newdoc=app.opendoc("MarketShare_BRZ_International.qvw","","")
/* also tried: set newdoc=app.opendoc("D:\QlikView\SourceDocuments\International\MarketShare_BRZ_International.qvw","","") */
newdoc.activatesheetbyid "SH11"
END SUB
My Problem is, when I try to open it in the source document, it works, BUT when I try to open it via AccessPoint of QlikView, it does not work.
I don't know what the problem is, so perhaps anyone has a suggestion or has solved a problem like this in the past.
Thanks for your help in advance!
Carl
Macro's often don't work in the ajax client. But in the ajax client it's possible to open a document by url and pass parameters in the url, for example for opening the document on a specific sheet. See this discussion: Passing Parameters in a URL and Document Chaining
Macro's often don't work in the ajax client. But in the ajax client it's possible to open a document by url and pass parameters in the url, for example for opening the document on a specific sheet. See this discussion: Passing Parameters in a URL and Document Chaining
Carl
Why not simply use an <OnOpen> Trigger to activate the required sheet.
Settings | Document Properties | Triggers
<Document Event Triggers> <OnOpen>
<Add> <Layout> <Activate Sheet>
Best Regards, Bill
If you open app2 using 'open qlikview document' action on button click in app1, then another 'on open' action in app2 could be used to trigger 'activate sheet'. That could help you. Only disadvantage I see, app2 would always open in that specific sheet.
Hi Carl,
you can try an expression like this:
Application.OpenDoc "qvp://server/file"
Hi Bill,
thanks for your answer, but that does not work in my case. I have more than one button in my first app and so it depends on the button which sheet of the second app should be opened.
Carl
Hi Tresesco,
thanks for your answer, but unfortunatly that disadvantage you mentioned is exactly my problem. so that doesn't solve my problem.
Carl
Hi Claudio,
thanks for your answer, but I also tried your solution. It works in the source document but not in the user document via access point.
Carl
Hi G Wassenaar,
I have solved my problem with the discussion of the post you have linked. Thank you.
As open trigger I have used "open URL" and there I put my URL with parameters.
Note: In my case only when the document is opened with the Full Browser Version in the access point, it'll work perfect, but that's ok for me.
Carl
Hi,
Carl you are probably using this physical path of the server. To work properly you should use the path of the access point, as in the example below that works correctly in my business:
QVP 😕 / mywork.com.br / File.qvw
You can take the correct path when trying to open a file on the option: "open in server" in QlikView desktop.
If you test in QlikView desktop will give error should only work when the file is published.