Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Nov 6, 2015 6:35:13 AM
Nov 6, 2015 6:35:13 AM
This tutorial is intended to illustrate HTML report creation. It is presumed that you are familiar with common NPrinting procedures.
We are going to embed images of two QlikView objects in an HTML report in this tutorial, and then add a level and the level variable tag as the label to HTML report which will then have an appropriate title and images in a frame for each of three years.
Open an existing NPrinting document or a new one. We will use a sample QlikView document, SalesDemo.qvw, for this tutorial. Establish a connection to SalesDemo.qvw (see: How to Connect to your QlikView documents).
Import images of QlikView objects:
This resulting HTML report is the result of the code that follows:
<html>
<body Style="text-align: center;">
<h3 Style="text-align: center; font: 21px verdana;">
Top 3 Countries
<h3>
<img src="%%CH296%%" alt="CH296">
<h3 Style="text-align: center; font: 21px verdana;">
Top 25 Products
<h3>
<img src="%%CH184%%" alt="CH184">
</body>
</html>
Your HTML report can be produced with levels. For example, to produce a level that cycles through each year:
Add lines if necessary. The result is three new lines, %%Year_Level%%, %%/Year_Level%% with a blank line between.
Arrange the %%Year_Level%% line before and the %%/Year_Level%% line after the elements that you want to be included in the level cycle.
Here is the code for this simple HTML report:
<html>
<body Style="text-align: center;">
%%Year_Level%%
<h2 Style="font: 24px verdana;font-weight: bold;">
%%Year%%
</h2>
<h3 Style="text-align: center; font: 21px verdana;">
Top 3 Countries
</h3>
<img src="%%CH296%%" alt="CH296">
<h3 Style="text-align: center; font: 21px verdana;">
Top 25 Products
</h3>
<img src="%%CH184%%" alt="CH184">
%%/Year_Level%%
</body>
</html>
The code above produces this HTML report having three titled sections, one for each year. Simple results with simple style elements.