Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to open a QVW file in background

Here is the user requirement:

1. QVW file has a SECTION, with user name & password. 

     --- Already done. Data can be auto reduced after input user name & password

2. The report is stored on server, end user can use a customized application (on their personal computer) to download/view report. Before downloading, the "reduce not necessary data based on section setting" must happen on server, so that user can only download required data. E.g: The report is 10M, if this user open this report on server, the data will be reduced as 2M, and then user only need to download 2M report file to client.

Based on above, I use a tricky way to resolve this issue:

1. Create a service on server, using socket to monitor the request send by client

2. Create a client, send the download request (with file name, user name, pwd) to socket of server.

3. When server get this request, it will make a copy of original report, and then open that report by QlikOCX with usr/pwd, so section will work. After data is reduced, save it, and then download it. Here is the source code

     AxQlikOCX axQlikOCX = new AxQlikOCX();

     axQlikOCX.opendocument(_fileName,_userName,_pwd);

     axQlikOCX.DocSave;   // I forgot if the command I used, just type here to explain what I did, and it works fine.

It will throw an exception that : this object must be added into a form (or a container).

So, I create a form, add it into this form, and then set the form as invisible. It works fine.

The only issue is that, during executing, a small grey shadow window will be displayed on screen, for only 1 second.

So, can some one tell me how to make this action be really invisible? Did I used the correct object(AxQlikOCX) or not?

I mean this object must be added into a container, is there any other object can do the same job, but not necessary to be added into a form?

Thx

0 Replies