Qlik Community

Ask a Question

Qlik Design Blog

All about product and Qlik solutions: scripting, data modeling, visual design, extensions, best practices, etc.

Announcements
Join us March 10th, 7 Ways Modern Analytics Can Help You Take Smarter Action. REGISTER NOW
Charles_Bannon
Employee
Employee

As a QlikView developer I am often asked to load images into QlikView. In some instances the images are associated to other data fields and in other instances they are to be loaded in to the application to help convey a message. For example, let’s say that you need to bring in flags of countries that are to display when the corresponding country is selected and you need to display an icon that indicates whether sales for a country are above or below a predefined threshold. It sounds like an easy enough task; so how do you do it?

Well, QlikView offers the developer the Bundle function that can be added to the Load statement. Bundle Load statement allows the developer to load the image files directly into the QlikView application for portability.

The Bundle Process is a very simple scripting process. The syntax for the Bundle Load should look like this:

image1.png

The image file should contain two fields:

  • The first field is an identifier such as an index number, image name, a key field that associates the image back to other data files, etc.
  • The second field should contain the path to the image.

This file contains the CountryID so that I can associate the flags with the countries

image2.png

This file contains just an image name because I am just using these icons as a reference and they are not associated to any fields in other files.

image3.png

Once the images are loaded into QlikView we can now reference them using the INFO() function and a standard IF Statement:

image3a.png

I am using the INFO() function to display the flags so whenever a Country is Selected, QlikView will know to go grab the corresponding image based on the CountryID. If we needed to, we could do the same thing with the symbols by simply adding a list box for Image Name and selecting an image from there. For this example though, I am using a standard IF Statement to display the symbol for the country sales.

Here is what it looks like when the user selects a country. The Info() function displays the image associated with CountryID =1 and because Sales were above the threshold the green square is displayed.

image4.png

One note of caution, when images are loaded into a QlikView application using the Bundle Load statement, both the amount of RAM and the size of the application increase so consider both the size and the amount of image files before deciding to use the Bundle LOAD statement.

I wrote a technical brief that outlines these steps in more detail. You can access it here.

Happy Qliking!

28 Comments
paulyeo11
Master
Master

Nice post, can you pls upload qv doc here ?

0 Likes
6,235 Views
kouroshkarimi
Creator III
Creator III

The qv file is included in the technical brief zip file linked in the post.

6,235 Views
MK_QSL
MVP
MVP

Good Information... very helpful indeed.

6,235 Views
Not applicable
6,235 Views
Not applicable

hi chuck Bannon,

It's good to see load images into qlikview.

table_img:

info

load * inline

[img, help

img1 ,'C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg'

img2, 'C:\Users\Public\Videos\Sample Videos\Wildlife.wmv'

img3, 'E:\softwares\Feb2006_OffShore_Sametime_SetUp.doc'

ss4, 'C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg'

];

it consists of images and videos

Capture.PNG

Her img2 is video file.  simply by clicking on img2 and then by clicking on ' i ' (marked with yellow colour ),  it will play video .

even we can load pdf, word doc too.

Thanks and Regards

Satti 

6,235 Views
Not applicable

I used this technique only locally, and I am curious what happens when you use it on a server. Does it try to open the file using client side applications?

0 Likes
6,235 Views