Qlik Community

QlikView Documents

Documents for QlikView related information.

iFrame Integration Example

Employee
Employee

iFrame Integration Example

Have you ever wanted to display QlikView content in a thrid party application? I was recently asked for a simple way of doing this, and found myself quite surprised how simple it actually was.

The brief was to display a QlikView chart (or a couple of charts) in an iFrame within a thrid party application. I knew it was possible to make selections automatically within QlikView by passing the selections within the AJAX URL. The syntax for this is to add something like &select=LB05,Swimwear to the URL. This will select the value Swimwear from the list box identified by LB05. I figured that as long as the host application can dynamically substitute text into the URL used, then you could display a QlikView chart (or charts) specifc to the selections made in the host.

The next issue to resolve was how do I limit the content displayed in the host application to just one or two charts. Well, that was pretty easy. I already knew you could hide the tabrow in the QlikView document in the document properties. But to make it even 'cleaner' I needed to hide the AJAX toolbar as well. Of course I found the solution to that on community. (The answer is contained in the read me attached to this post).


The final issue to resolve was how do I display certain charts in certain places in the host application. Well, I found you cannot select a specific sheet via the URL. But by using a selection in a field to determine which sheet is displayed, I can easily get around that issue and pass the necessary field selection in the URL.

I then built a simple iFrame application to test that this all worked, and that application is attached. User credentials are passed dynamically from the browser to QlikView when the iFrame URL requests the QlikView content via AJAX. So there was absolutely no coding to be done to make this integration work. The only coding necessary would be at the host application end, to dynamically pass the relevant selections in the URL. Below is a screen shot of th resulting web page.

QVIFrame.jpg

Attachments
Comments
Employee
Employee

Great post, Lee! 

0 Likes
Employee
Employee

And if you are running QV11 and want to integrate a single object from a QlikView document you could leverage the same technique Lee described but make use of the singleobject.htm solution. This is a example from our demo site: http://eu.demo.qlik.com/QvAJAXZfc/singleobject.htm?document=qvdocs/Prescription%20Tracker.qvw&host=D...

Then you can re-use an existing document and its objects.

Employee
Employee

Thanks Alexander

I wasnt aware of that option in V11. There doesnt appear to be anything in the QV reference manual about it, nor much detail on community. So for anyone interested in that approach it is just a matter of copying the normal AJAX URL for your document, replacing opendoc.htm with singleobject.htm, and appending a parameter for the object you want to display (for example &object=CH38).

So the AJAX URL

http://localhost/QvAJAXZfc/opendoc.htm?document=CFO%20Dashboard.qvw

would become

http://localhost/QvAJAXZfc/singleobject.htm?document=CFO%20Dashboard.qvw&object=CH38

However if you wanted to display a couple of QlikView objects on the page then this would require a couple of iFrames. There might be some authentication overhead with each separate HTTP call to QlikView Server, so in those cases it might be faster to use a custom QV app as outlined above.

Not applicable

Hello All,I am new to Qlikview.My query is almost similar to this post.If I want to load a deployed qlikview report from the click of a web page from asp.net.What could i done?

If I simply put the web url of deployed qlikview report on server,in the (reposnse.redirect) or in the iFrame does that work for me?Does that load report ,so that I can select or filter out the data on the report.The requirement is just to load the qlikview report from server on click on a button on webpage.

0 Likes
velazquez
New Contributor

Hi there,

thanks a lot. Really great. I was looking for somthing like that. And Alexander, the  single object works perfect.

keep doing so!

Regards

Deny

0 Likes
dfoster9
Valued Contributor

Excellent post. Very helpful.

0 Likes
aemaaema
New Contributor II

Thx for the post really usefull

0 Likes
brindlogcool
Contributor III

Hi Lee,

I am having issues in passing parameters over query string to iFrame. The parameters passed is not getting selected.Any suggestions would be great.

0 Likes
Employee
Employee

I would forget the iFrame for the moment and just concentrate on getting the URL right. Build up your URL with the relevant parameters just using a browser. Once it works in the browser, it should work in the iFrame. The QlikView Server Reference manual discusses the syntax for passing selections in a URL. There is also a video here:http://community.qlik.com/message/512614#512614

0 Likes
brindlogcool
Contributor III

Thanks Lee it works perfectly in the browser but not in the iFrame. I am using with the webticket. The url i have will be like this(removed the https)

testserver/QvAJAXZfc/Authenticate.aspx?type=html&webticket=0NCdO8uBOhH5bgULRj&try=//testserver/qvajaxzfc/opendoc.htm?document=TestApp.qvw &select=LB1,212121&select=LB2,1

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2013-04-04 08:58 PM
Updated by:
Employee