Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Once axQlikOCX1.OpenDocumentEx(...) is called, how to get the server name in code.
I can able to get file path from axQlikOCX1.ActiveDocument.Name propert but the server name eg. qvp://servername from which property I can get this one.
Tried with axQlikOCX1.ActiveDocument.PathName too
ActiveDocument.GetApplication.GetProperties.Computername ?
Its giving my computer name,, not the server name I am connecting!!
If your application is hosted in a sever, it would give you that server name.
no my application is not hosted in server,,, I will connect to server using axQlikOCX1.OpenDocumentEx(qvp://server name).
This command connecting and opening the file in server.
but after this I am not getting the server name in OCX property!!
As there is no connection between Plugin and Server, it seems not to be possible to get the Server Name. ComputerName() is a Script function which can be used to create a variable in script which then can be evaluated in Plugin as a macro variable. However, this is not 100% reliable, e.g. if the qvw file has been moved from one Server to another one without script reload.
Another "instant" method to get the Server Name is:
1.) Enable Auditing on Server. This willl create a file <logfolderonserver\Audit_<SERVER>...log
2.) Allow read access to the logfile from QVPlugin Client.
3.) If Plugin session is visible in Audit_<SERVER>...log, Server name is equal to <SERVER> part of the log file name.
Marcel