Skip to main content Skip to complementary content

Creating HTML reports

The following shows how to create an HTML with levels. It assumes that you are familiar with common Qlik NPrinting design features. HTML reports support most Qlik Sense objects. See: Working with Qlik objects

We are going to embed images of two QlikView objects in an HTML report, and then add a level and the level variable tag as the label to the HTML report. The resulting report will be produced with an appropriate title and images in a frame for each of three years.

Information note HTML reports can contain many HTML and images files. They are delivered to users as .zip files.

Creating a new HTML report

Do the following:

  1. Select Reports in the Qlik NPrinting main menu, and then click Create report.
  2. Enter a Title for the report, for example: HTML Report (Sales).
  3. Select HTML from the Type drop-down list.
  4. Select an app from the App drop-down list. For example, select Sales Demo.
  5. Select a Template from the options available:

  6. Click Create to create the report.

Selecting connections and objects to add

Do the following:

  1. Click Edit template to open the Template Editor.
  2. Right-click the Images node, and then select Add objects.
  3. Select the objects. In this case, select CH184 and CH320.
  4. Click OK.
  5. Drag and drop the CH320 and CH184 tokens onto lines between the <body> and </body> tags.
  6. Add lines as necessary, and add some block element tags such as <p>, <table>, or <div> for layout management and inline style elements, as shown in the next section.

Preview and save

Do the following:

  1. Click Preview.
  2. Check the report, close it, and then edit the template again if necessary.
  3. Click Save and Close to save the template and close the Template Editor.

Resulting report

The following HTML code, for example, creates a corresponding HTML report:

<html> <body Style="text-align: center;"> <h3 Style="text-align: center; font: 21px verdana;">
 Top 10 countries
 </h3>   <img src="%%CH320%%" alt="CH320">  <h3 Style="text-align: center; font: 21px verdana;">
 Top 10 products
</h3> <img src="%%CH184%%" alt="CH184"> </body> </html>

Opening the select levels window

You can produce an HTML report with levels. For example, to produce a level that cycles through each year, do the following:

  1. Right-click the Levels node, and then select Add levels.
  2. Select Year from the levels list.
  3. Click OK.
  4. Expand the Levels node.
  5. Drag and drop the Year_Level node token onto a line between the <body> and </body> tags.

    Add lines if necessary.

  6. The result is three new lines, %%Year_Level%%, %%/Year_Level%%, and a blank line between the lines.

  7. Arrange the %%Year_Level%% line before the elements that you want to be included in the level cycle, and the %%Year_Level%% line after the elements that you want to be included in the level cycle.
  8. Expand the Year_Level node.
  9. Drag and drop the Year node token onto a line between the %%Year_Level%% and the %%Year_Level%% lines.

  10. Add inline style elements. See the code examples below.

Preview and save

Do the following:

  1. Click Preview.
  2. Check the report, close it, and then edit the template again if necessary.
  3. Click Save and Close to save the template and close the Template Editor.

Resulting report

The following HTML code, for example, creates a corresponding HTML report. The report will have three titled sections, one for each year.

<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 10 countries
</h3> <img src="%%CH320%%" alt="CH320"> <h3 Style="text-align: center; font: 21px verdana;">
 Top 10 products
</h3>  <img src="%%CH184%%" alt="CH184">   %%/Year_Level%% </body> </html>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!