Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

Determining which client was used to open QlikView document

Good afternoon,

I have been trying to determine which client is being used to open a QlikView Document in version 9.00.7440.8 SR3

There are several discussions on this topic related to using ActiveDocument.GetApplication.QTProduct.

However, this always seems to return the same value no matter whether the document was open with the IE plugin or AJAX: QlikView 64-bit Edition (x64)

According to the other discussions it should return QlikOcx when the client is the IE plugin.

I have added a macro to the OnOpen document event trigger.

sub OnOpen
' Attached to the document OnOpen trigger.
set doc=ActiveDocument
set app=doc.GetApplication

app.WaitForIdle
if app.QTProduct = "QlikOcx" then ' client = plugin
      IeOrAjax = 1
else
      IeOrAjax = 0
end if
      ActiveDocument.Variables("vIEorAJAX").SetContent IeorAjax, true
end sub

Are these discussions invalid for version 9 ?  Does QTProduct not work properly for version 9?

 

Thank you for your assistance.

1 Solution

Accepted Solutions
Not applicable

Determining which client was used to open QlikView document

Try adding this to the OnOpen event macro - I dont know if the sheet trigger will fire but can't see why not.

ActiveDocument.Sheets("yoursheetname").Activate

Regards,

Gordon

8 Replies
Not applicable

Determining which client was used to open QlikView document

Think you may have a typo in the setting of the variable - it says IeorAjax when it should say IeOrAjax.

Also you could replace the 'ActiveDocument.Variables' with 'doc.Variables', just for consistency.

Also do you really want the true rather than a false (true means it is added to the MRU 'Most Recently Used' list)?

Regards,

Gordon

Not applicable

Determining which client was used to open QlikView document

Thanks for you help Gordon.

You are correct I do not really need TRUE for the MRU, so I set it FALSE.

The variable name change did not seem to impact the results.

I am trying to pass a 1 or a 0 out to the QliView variable vIEorAJAX in order to use it to conditionally show a calendar control.

However, QTProduct never returns QlikOcx when the client used to open it is using the IE plugin.

Thanks

Not applicable

Re: Determining which client was used to open QlikView document

Hmm. I use v9sr4 and it works ok - see the attached example.

Is the variable defined? Is the macro attached to the OnOpen trigger?

Other than that it looks like it could be a bug.

Regards,

Gordon

Not applicable

Re: Determining which client was used to open QlikView document

oh - the only other differnece is that I am using 32 bit, although the plugin is still the same...

Not applicable

Determining which client was used to open QlikView document

Gordon,

Thanks for the example.

I do have the macro on the OnOpen trigger for the Document.  I think the difference may be that I am using 64 bit.

It seems to work if I put the macro on the OnActivate sheet trigger.  However, do you know if you can force the sheet to OnActivate when the document opens?  The OnActivate only works currently when you actually select the sheet.

Thanks again,

Don

Not applicable

Determining which client was used to open QlikView document

Try adding this to the OnOpen event macro - I dont know if the sheet trigger will fire but can't see why not.

ActiveDocument.Sheets("yoursheetname").Activate

Regards,

Gordon

Not applicable

Determining which client was used to open QlikView document

Thanks Gordon!

That seemed to do the trick.

Not applicable

Re: Determining which client was used to open QlikView document

Hi Miguel Angel Baeyens

I have facing this problem can you please help me

Hi Gordon

I am facing this problem can you please help me.

QlikOcx

macro parsed failed Functionality was lost

Export_To_Microsoft_word   ' macro  name

Error " the file could not be found

("C:\....\standard template.docx")    ' i am taking this template for inserting some Bitmap and Charts

this error Comes when I am login with access point and firing the macro.

but on the server it is working well the only problem id is coming when I am loggging with access point.

Thanks

Community Browser