Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ClikCommunity,
I'm want to download a document from our QVS. Does the QVS have the potential to do this and if how?
We are already downloading a List of all Documents from the server, which works fine. This is the methode I use:
QvClient client = new QvClient("company-QVS");
client.UserName = "Test1";
client.Password = "test1";
client.Connect(QvClient.Mode.Authenticate);
answer = client.Execute("<Global method='GetDocListEx'><Type>16</Type></Global>");
Is there a methode(like the 'GetDocListEx') which retruns a document? Is there a documentation which lists all methodes that can be used via QvClient.Execute(...)? Or is there any other way without installing a FTPServer and make a FTPWebRequest?
You can use QlikOCX in project. There is a method there called "OpenDocument" that returns a QVW. In C# it would look like this:
axQlikOCX1.OpenDocument("c:\\OcxDemo.qvw", "","");
See the OCX reference manual for more details.
Regards,
Thx for your reply, but actually i try to find a workaround for the OCX. If i use the OpenDocument-Methode with a serverside qvw(via qvp://) and pass Username and Password. The OCX asks for Username and Password again. And if I pass the Username via qvp:// i still get ask for the Password. But i build my own login dialog(for the QvClient) and i don't want the second one from the OCX.
We would like to download the document via the QvClient.Execute(...) methode(or something like that) to a local tempfile, so we can open the file localy and bypass the second server authentifaction.
you can do something similar to this pseudocode:
handle = client.Execute ("<Global method='FileDownload'><Path>doc.qvw</Path><Size /></Global>")
handle is a param you pass to next call, size is an out-paramater wich will be initialized with the file size.
data = client.ExecuteWithAttachments ("<Global method='FileRead'><h>"+handle+"</h><Pos>0</Pos><Count>"+Size+"</Count><Buffer /></Global>")
i haven't done it in a while but this should illustrate the basics.
cheers,
lars
Did you solve the problem?