Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Opening document from other

Hi,

can you explain me if it's possibile, and how, to create an QV document that manages other QV docment ?

I have realized this with a Macro on a button and it works...but if I deploy the document on the server it doesn't work.

It seem like the the Macro cannot run in the browser (in a LAN contest).

Thanks a lot.

4 Replies
Not applicable
Author

Hello Sayed

I have got this working on the Server in the last couple of weeks so it's certainly possible, it is probably something to do with your macro that is causing the problem. Can you post a sample of the code you are using so I can take a look.

Regards,

Nigel.

Not applicable
Author

I have not the Macro with me now.

Can you please post me yours ?

So I can try and verify.

Thanks a lot.

Not applicable
Author

This is the one I use:

SUB LaunchApp

SET doc = ActiveDocument

'This part deals with setting a parameter to send into the invoked document, it is of course optional
'And you would need to add something into the invoked document to transfer this to a field
'selection, I have included it as an example
'
'Note that it will only set the value if a single selection is made, it cannot deal with multiple selections

SET fld = doc.GetField("CF_ShortName")
IF fld.GetValueCount(1) = 1 THEN ' explicitly selected
param1 = doc.fields("CF_ShortName").GetSelectedValues.Item(0).text
ELSE
IF fld.GetValueCount(2) = 1 THEN ' implicitly selected (associated)
param1 = doc.fields("CF_ShortName").GetOptionalValues.Item(0).text
ELSE
param1 = ""
END IF
END IF

'Note: BU220 is a button that is hidden in the document, it is marked as a button to Launch/Export and by default
'the properties are set to launch the Internet Explorer application.

SET b = doc.GetSheetObject("BU220")

SET bp = b.GetProperties

'Following line sets the application to Launch
bp.Application.v = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"

'Following line sets the parameter property of the button, this is the URL to launch the invoked document
'note that qvp:// is the standard syntax for launching a document on the server, the path and filename
'obviously should be changed according to your own requirements.
bp.Parameters.v = "qvp://qaqkv02/darqmatter/innovation/Investor Reporting (Innovation).QVW?parm_FundName=" & param1

'This line sets the above properties into the button
b.SetProperties bp

'This line presses the button (i.e. it executes the launch/export function
b.Press
END SUB

Regards,

Nigel.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can also just put the qvp URL in a launch button. No macro required.

-Rob