Qlik Community

QlikView Management

Discussion Board for collaboration on QlikView Management.

pljsoftware
Contributor III

Execute Macro to Reload documents on Server

Hi guys,

I must to write a macro that start the reload of an other document e.g. :

Doc A contains a macro that reload the Document B.

sub Reload()
'Macro in Doc A
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("C:\Program Files\QlikView\Qv.exe /r D:\Test Reload\ExternalReload.qvw")

Set WshShell = nothing
Set oExec = nothing
end sub

My macro run correctly on local client but if I put the documents on server and open they by remote connection the reload do not work.

Somebody know how can I doing this?
Is possible to write a macro that can be execute on server and not on client when I open a document from remote connection?

Thanks in advance

Luca Jonathan Panetta

PLJ Software

1 Solution

Accepted Solutions
pljsoftware
Contributor III

Execute Macro to Reload documents on Server

Hello guys,

I have solved it by an table on my DB where I update a value that say me if I must to reload my data.

Thanks!

------------------------------------

Luca Jonathan Panetta

PLJ Software

10 Replies
Not applicable

Execute Macro to Reload documents on Server

Did you try realoding this document using publisher?

pljsoftware
Contributor III

Re: Execute Macro to Reload documents on Server

No! I use the command line to make the reload.

Luca Jonathan Panetta

http://www.pljsoftware.com

Not applicable

Execute Macro to Reload documents on Server

1. Are these two documents are loading independently on the server?

If YES, I dont see any reason why it wont run using macros.

Also you could try with Publisher.

pljsoftware
Contributor III

Re: Execute Macro to Reload documents on Server

No, they are dependently.

Document A is used to verified data, when data are checked the user click a button and I want to enabled the reload of document B.

------------------------------------

Luca Jonathan Panetta

PLJ Software

MVP
MVP

Execute Macro to Reload documents on Server

Hello Luca,

I may be missing something here, are you running a QlikView Server? Meaning are you opening the document on server using clients (IE Plugin, AJAX)? If that's the case, then take into account that not all macros work nor can be triggered by buttons/actions, in first place, in second you will need to set up the server so it allows the execution of non-safe macros and system-access macros, and third, you have to ahve installed the Desktop application in your server, since qv.exe is the Desktop executable.

Hope that helps.

pljsoftware
Contributor III

Execute Macro to Reload documents on Server

Hello guys,

I have solved it by an table on my DB where I update a value that say me if I must to reload my data.

Thanks!

------------------------------------

Luca Jonathan Panetta

PLJ Software

Not applicable

Re: Execute Macro to Reload documents on Server

Hi Luca,

Could you please elaborate how you did that?

Is it like this?

When a user clicks a button , some setting is inserted into the db, and then the server detects this , and runs a reload?

But, what is to be done to achieve this?

Thanks and Regards,

Anju

pljsoftware
Contributor III

Re: Execute Macro to Reload documents on Server

Hi Anju,

I have loose my example, but I explain you how I had make it.

You must to create a table on you DB where you insert or update a value in a specific field, e.g. UpdateFieldFlag.

To make this you must to use the macro to write this new value into your DB table.

After in your Qlikview script you test your UpdateFiledFlag and make what you want.

To insert data in DB look this http://community.qlik.com/message/135858#135858

I hope this help you.

Regards

Luca Jonathan Panetta

PLJ Software

Not applicable

Re: Execute Macro to Reload documents on Server

Hi Luca,

How are you reloading the dashboard based on the database value?

Is it happening manually or through EDX triggers? we have a similar kind of situation wherein i need to reload the dashboard whenever the user opens the web page(where we load the dashboard in an IFrame).

We tried using EDX Triggers but are facing issues in implementing them.

Ref: http://community.qlik.com/message/300170#300170

Thanks

Sai Krishna

Community Browser