Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Document chaining - Using macro, keeping state

Hello,

I was wondering if there is a possibility to launch a QVW from a QVW transferring the state, but using a macro and NOT how it's done below.

Jump.png

I've seen in the API code like this, but I don't know what the parameters serve for...

Sub Jumping

Set App = ActiveDocument.GetApplication

Set newdoc = App.OpendocEx("qvw - invoices.qvw","","")

End Sub

Thanks for your advice!

Regards,

Maarten

4 Replies
Anonymous
Not applicable
Author

I guess it would be possible. Haven't checked if there are any new API's related to this but I guess one option would be to check the current selections, and then select them programatically in the new doc.

It doesn't sound cumbersome and not very useful though. What's the problem with using an action?

Not applicable
Author

Hi Johannes,

Well, I would like to use an action (Open document), but for some reason (is this a bug? I'm using QV10 SR1) when I combine a macro with the 'Open Document' action, not all functionality is executed.

I created an example on the forum to illustrate this. It can be found here

http://community.qlik.com/message/124917#124917

(unfortunately nobody was able to help me out there, maybe people are overwhelmed by all the text I wrote as guidance )

The bizar thing is that it does work if I do it in sepearte steps (i.e. one button to execute the macro functionality, and one for the actual jumping).

KR,

Maarten

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   I would suggest you not to use macro's when you have same functionality with inbuilt actions.

   The reason is macros are slow and thus effects the performance of the document.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Well, to be honnest I tried to do this...

But I came across the problem that I could not remove bookmarks using an action (needed to keep a certain state of selections before and after the 'jump' to the other QVW.

Either way, I just check the release notes and noticed that some bugs were related to macros and bookmarks... in QV10SR1. Therefore I upgraded both the server and the client... and using a combinatation of actions and one macro (to remove a bookmark) it seems that this problem has solved itself... (need to test it extensively, but at first glance it looks OK).

Thanks for the macro tip, I did not know it was that slow...

Regards,

Maarten