QlikView Extension tutorials, documentation and examples

By Barry Harmsen

Online QlikView Extensions TrainingWe now offer monthly live online training on QlikView 11 extensions:
Check the course page for upcoming dates

QlikView extensions documentation, tutorials and examples.QlikView Extensions offer nearly unlimited possibility to extend the look, feel, behavior and functionality of QlikView. Unfortunately, most QlikView developers seem to avoid them. While many may simply not need extensions, I often get the impression that a second, more important reason is that most QlikView developers currently miss the required web development skills.

For QlikView developers wanting to bridge the gap between QlikView and extension development, the lack of documentation and scattered examples can make it seem like a daunting task. In reality though, once you find the right resources it is a relatively small step.

The goal of this post is two-fold. First it aims to provide a few key resources that will help you quickly start developing extensions. Secondly, it is meant as a continually updated repository of QlikView extension examples, tutorials, documentation and relevant forum discussions.

Extension introduction

Before we look at the various extension tutorials, documentation and examples, let’s first have a quick look at what extensions are, what types there are and how they can be used in QlikView.

In QlikView 9, if you wanted to develop a custom visualization you had to use the QlikView Workbench and move your entire QlikView deployment to a .NET based website. For many organizations this was a bridge too far, creating a completely custom QlikView environment for only a single visualization is a hard business case to make. The other alternative was creating a custom OCX control, but those only work in QlikView Desktop and the plugin, and are far from future-proof.

Object Extensions

An example of an object extension

The introduction of Object Extensions in QlikView 10 greatly simplified custom visualizations in the QlikView AJAX (or WebView) environment. An Object Extension is a regular QlikView object, but one you can add your own custom JavaScript rendering code to. For example to add OpenStreetMap to your QlikView application. Now it was possible to add custom visualizations without needing to move to a custom .NET based website.

Document Extensions

Document Extension exampleQlikView 11 expanded upon Object Extensions by introducing Document Extensions. These extensions allowed you to not only customize a single object, but the entire document. For example, it allows you to change the default green selection color (though admittedly, that could be achieved without a document extension as well).

Extension structure

Both types of extensions interact with the QlikView AJAX engine via a JavaScript API. Extensions are delivered in a .qar file. This is a zipped file that contains, in its most basic form, the extension definition in XML and the extension script in JavaScript. Additionally, a custom properties page (in HTML) and icon (in PNG) can be included. More information (though a bit dated) about the contents of the .qar file can be found here.

Installing extensions

Adding an extension to QlikView Desktop is as simple as double-clicking the .qar file. This will automatically unpack the file and move the files to the correct folder, which for Object Extensions is:

C:\Users\[Username]\AppData\Local\QlikTech\QlikView\Extensions\Objects

for Document Extensions the folder is:

C:\Users\[Username]\AppData\Local\QlikTech\QlikView\Extensions\Document

On the server side, installing extensions is a little more work. You have to manually change the extension of the .qar file to .zip and extract the contents of the file to:

C:\ProgramData\QlikTech\QlikViewServer\Extensions\Objects

for Object Extensions, or to:

C:\ProgramData\QlikTech\QlikViewServer\Extensions\Document

for Document Extensions.

Adding Extensions to your app

Add an object extension to your QlikView applicationExtensions can only be used in the AJAX client or WebView mode, so to see extensions in QlikView Desktop you first need to enable WebView mode by selecing View | Turn on/off WebView.

To add an Object Extension, right-click anywhere on the worksheet and select New Sheet Object. Next, open the Extension Objects pane and drag the extension to the worksheet.

Add a document extensionTo add a Document Extension, open the Document Properties by selecting Settings | Document Properties. Then navigate to the Extensions tab and select the document extensions that you wish to add from the Installed Extensions list and double-click them to add them to the Active Extensions list.

So, now that we’ve seen what QlikView extension are, and how they can be used in our applications, let’s look at the tutorials, documentation and examples that will help you build your own extensions.

JavaScript tutorials

As extensions are written in JavaScript,  having basic knowledge of JavaScript is a prerequisite for building them. If your skills are not entirely up to snuff yet, have a look at this JavaScript tutorial at W3Schools. For some more advanced scripting, you may also want to look at the jQuery tutorial and HTML DOM tutorial.

Extension tutorials

Once you possess some basic JavaScript skills, the next step should be Stephen Redmond’s excellent “Beginners Guide to QlikView Extension Objects” series of tutorials:

Dmitry Gudkov augments Stephen’s tutorials with a few useful hints & tips: Building extensions in QlikView: some hints & tips

After finishing these tutorials, you should have a basic understanding of how to create an extension object.

Development environment

I use Notepad++ to develop my extensions, but there is also a template for Visual Studio that comes with the QlikView Workbench. Should you have access to this, these articles might be of interest to you:

I mainly test my extensions on Firefox and Chrome. For debugging, I use the Firebug plugin for Firefox. This lets you quickly inspect HTML, CSS and code and, in my opinion, makes extensions a lot easier to debug and troubleshoot.

Extension reference materials

The next step involves familiarizing yourself with the (few) available reference materials:

  • QlikView SDK: the QlikView SDK is broader than extensions alone, it offers links to the QlikView JavaScript API (described below) and a few extension examples:  QlikView 10QlikView 11
  • QlikView JavaScript API: documents the various methods and properties that can be used within extensions: QlikView 10QlikView 11
  • Properties QVPP Reference: documents how to create a properties page for your extension: QlikView 10
  • Extension Definition File Reference: QlikView 10 & 11

Extension examples

When learning something new, I often find that studying examples and figuring out how they work can speed up the learning process. With that in mind, here are some QlikView extension examples of varying complexity:

Object extensions

A very comprehensive list of object extensions can also be found on Stephan Walther’s blog.

Document extensions

 

Other relevant information

Once your extension development skills improve, your questions will probably become more focused. Below are a few bits of information I found very useful while developing extensions.

Stay tuned

As said at the start of this post, one of my goals is to create a repository containing everything you need to know to develop extensions. I will regularly update this post with any new tutorials, documentation, examples or other information as it becomes available. Of course, if you have any good tips, feel free to post a comment.