
Check the course page for upcoming dates
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
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
QlikView 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
Extensions 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.
To 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:
- Using QlikView Extensions – Version 10: video demonstrating the Visual Studio Extension Template.
- Understanding QlikView 10 Extension and the QlikView 10 Workbench: PDF describing how the introduction QlikView Extension Objects impacts the use cases for QlikView Workbench.
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 10 – QlikView 11
- QlikView JavaScript API: documents the various methods and properties that can be used within extensions: QlikView 10 – QlikView 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
- Hello World
- Stream Chart
- Tree View
- Word Cloud
- Twitter feed
- Google maps
- Open Source Geospatial Mapping
- Call a Webservice via SOAP, HTTP Get or Rest
- Wind Rose Chart
- Video player
- HTML5 speech input
- 3D Surface Chart
- Formatting QlikView Data the Web Way
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.
- Pre-populate dropdown values in an extension (QVPP) properties page
- Upgrade extensions to QlikView 11
- Using sub-directories in QlikView 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.
26 Comments
Amazing tutorial..thanks so much !
Great Tutorial! Helped me a lot!
However, I’m facing a problem when I try to access the HTML 5 Canvas getContext() method in the script.js file. On client tool WebView option enabled.
Do you know if the HTML 5 is suported by the Qlikview Client?
Thanks
Barry,
Awesome curation of many, many things QVExtension! You are correct, this could definitely be another book!
I owe you an authentic Rijsttafel ! And we got the better part of that deal!
I am trying to get my head around WorkBench and what it provides for the cost. I turns out to use WorkBench also requires some ‘secret handshakes’.
Many thanks
David
Wow Barry that’s great – one of those “why have I never done that before” moments! 🙂
Barry,
I have been pushing through the Kindle version of your QlikView 11 for Developers book, but realized that at the conclusion I wanted to push more into some serious programming. I thought I read that AJAX was going to be the journey, but was not able to find much training resources on it until this link. I hope this stays around long enough until I finish your book. This weekend so I can get through your tutorials on this page. Thank you Sir! this is great!
Kevin
Great tutorial!!! I will be trying these out soon.
Adam
Webofwork.com
Nice summary, thanks for the info. It’s still not clear to me though — how do I get the .dll’s needed to make SDK programs? Is it available to the Personal AND Server additions? I want to make a Deploy to Server button or menu item. Can anyone provide basic direction on getting setup to develop (in visual studio, I’m assuming)?
Thanks,
Rob
A little more digging reveals that you need to install the QlikView Workbench. However, on the install I am prompted for a server URL, and am not allowed to continue without inputting one. Our company doesn’t have the server edition setup yet, only Personal copies. Is it possible to use the SDK/workbench with the Personal Edition?
very nice tutorial, when i am implementing google map extension in my qlikviewv11 application , i already downloaded map.qar and installed but when i am enabling webview to add new sheet object , geeting the error that
“unable to’ get attribute’ of undefined or null reference”
http://qlikview/QVAjaxZfc/QvAjax.js
any help is much appreciated ,
thanks in advance
Hello,
have you found a solution to this? I am facing the same problem.
Thank you very much.
Hi,
Very nice article. I have a very fundamental doubt. Can I restrict one sheet in my QV document to be only in Desktop view? I don’t want WebView to be reflected on that sheet as some macros don’t run.
Please tell me how to do this!
Thanks in advance,
Prem
P.S: Urgent.
Great tutorial! I wonder what you think of Qlikview.Next?
Will these extensions work on the new web based version? As I understand they might stop supporting ocx and go for cross platform solutions…
Just want to mention I have built a Gantt chart extension and a few others check it out at http://webofwork.com/index.php/19-qlikview-tips-and-tutorials/90-qlikview-gantt-chart
Thanks, Adam
Do you know if you can set the comments property for an expression programically?
Thanks in advance.
Heres another extension that lets you create a number flapper / ticker. Check it out!
http://webofwork.com/index.php/component/content/article/2-uncategorised/110-qlikview-number-ticker
Hi,
Can you please tell me how can we read the shared bookmarks from repository using javascript? I have used the below code but it only fetches the normal bookmarks and not the shared bookmarks
MyDoc = Qv.GetCurrentDocument();
MyBookmarks = MyDoc.Bookmarks().BookMarks;
I will appreciate if you could help
Hi Barry is there a way to get a list of all reports published on AccessPoint, from an application.
Hi Barry,
the article is very useful, thanks for the same.
can you also share some knowledge about deploying the extension objects to server.
Best Regards
Vidit
Hi ,
When i am using JS file.. I am getting one error..
“Unable to get property getContext of undefined or null reference”
Anyone face this type of error…
Please let me know.. How to resolve??
Thanks…
Hi Barry, ran into an issue with the installation of an extension that I thought I’d share. I was implementing your NoGreen extension on a QlikView 11.2 SR 5 install. Everything went fine with the desktop install, but I was unable to get things to work on the server side. Digging around, a closer look at the C:\Users\[Username]\AppData\Local\QlikTech\QlikView\Extensions\Document folder revealed that there was a “NoGreen” sub-folder which contained the extension files. I went ahead and created the same folder structure on our QlikView server, moved the files, and the color change worked like a charm. Moral of the story… install extensions locally and replicate the folder structure when moving it to the server side.
Thanks very much. Useful Information on Extensions
Hello.
Are there standard requirements or standards of good practice for Qlik Sense?
I realize that after installing some extensions that we found on the web they give problems after some software version update.