QlikView Mashup Examples & Documentation (QlikTip #48)

Creating Mashups in QlikView is extremely simple but I am very often surprised that QlikView’s ability to integrate QlikView documents and objects into other web application is not used very often, sometimes it is not even known that this can be achieved easily.

Maybe one reason for that is that documentation and examples are very rare. That’s why I have created a very detailed documentation + examples which I am publishing now.

What are Mashups?

A definition from Wikipedia:

A mashup, in web development, is a web page, or web application, that uses and combines data, presentation or functionality from two or more sources to create new services.
The term implies easy, fast integration, frequently using open application programming interfaces (API) and data sources to produce enriched results that were not necessarily the original reason for producing the raw source data.

What do You Need for Mashups with QlikView?

From the license perspective “Workbench” has to be enabled on your QlikView server. So if you have a look at your LEF-file there should be one line which looks as follows:


How Does QlikView Support Mashups?

There are three ways how one can realize mashups with QlikView document and/or objects:

  • Simple document integration (using opendoc.htm)
  • Simple object integration (using singleobject.htm)
  • Div integration (using the Ajax Javascript library)

The Basic Idea behind Opendoc.htm and SingleObject.htm Integration

If you have installed QlikView Server the ability to create Mashups is already there! Have a look at the folder “C:\Program Files\QlikView\Server\QlikViewClients\QlikViewAjax\” and you’ll find two files which can be used easily to either integrate a document or only some QlikView objects into another website:

  • opendoc.htm
  • singleobject.htm

The idea behind this kind of integration is to call a Url on the QlikView server and at the same time pass some parameters which document or object you would like to integrate. The result from the QlikView server can be easily integrated into any website using an Iframe tag in Html:

<iframe src="http://localhost/QvAJAXZfc/opendoc.htm?document=Sales%20Compass.qvw" />

The Result:

A QlikView document is integrated into another website

There are several parameters available to control the output from opendoc.htm or singleobject.htm.
A detailed list of parameters and how thy can be used are available in the QlikView Mashups Microsite.

The Basic Idea behind Div Integration

Div integration goes one step further and allows a more granular and powerful integration of QlikView objects into an existing website using the QlikView JavaScript API.

To get Div Integration to work there are three steps necessary:

Step 1: Include the QlikView JavaScript API into your website

<script language="javascript" type="text/javascript" src="http://localhost/QVAJAXZfc/htc/QvAjax.js"></script>

Step 2: Initialize the API

(in this example for the document “Sales Compass”)

<script language="javascript" type="text/javascript">
      View: 'Sales Compass',
      Host: null

Step 3: Define where QlikView objects should be shown in your Html structure

<!-- Listbox with the Id LB5732 from the document "Sales Compass" -->
<div avqview="Sales Compass" avq="object:.Document\LB5732"></div>

The Result

Several QlikView objects are integrated into an existing website

QlikView Mashups Microsite with Documentation & Examples

To make it easier to demonstrate Mashup capabilities I have created a dedicated QlikView-Mashup microsite, which should help as

  • A reference
  • A collection of code-samples
  • A collection of ready-to-demo examples

Resources and Download

Bookmark and Share

and tagged , , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.