Skip to main content Skip to complementary content

HTML reports containing tables

Tables exported from QlikView or Qlik Sense can be displayed with or without the original headings. You can hide the headings that were exported, and then create your own custom headings. This is also true for tables constructed by putting together columns generated from data fields.

The following example shows how to create an HTML report with tables using QlikView objects.

Create 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. Keep the Enabled check box selected.
  6. Click Create to create the report.

Add tables to the template

Do the following:

  1. Click Edit template to open the Template Editor.

  2. Right-click the Tables node, and then select Add objects.
  3. Select QlikView object CH184 - Top 10 Products from the list in the objects list.

  4. Click OK.
  5. Right-click the CH184 - Top 10 Products node, and then select Properties.
    Information noteIf the Properties window is already in view , the Properties option will not be shown you right-click a node.
  6. Select the Keep Source Formats and Show Headers check boxes in the Properties window.

  7. Drag the CH184 - Top 10 Products table node tag into the template and drop it onto an empty table data container:

    <html>
    <body>
    <table>
    <tr>
    <td>
    <h1 style="text-align:center">
    Top 10 Products<br /br>
    with QlikView Heading
    </h1>
    %%CH184%%
    </td>
    <td>
    <h1 style="text-align:center">
    Top 10 Products<br /br>
    Hidden QlikView Heading
    </h1>
    </td>
    </tr>
    </table>
    ...

    Two versions of the table side by side are displayed. The left table has the QlikView headings visible, and the right table has the QlikView headings hidden. The table is embedded as a unit in both cases.

  8. Add CH184 - Top 10 Products to the template again, resulting in a CH184_1 - Top 10 Products table node.
  9. Open the Properties pane for CH184_1 - Top 10 Products, and then set the Show Headers property to Hide.
  10. Drag the CH184_1 - Top 10 Products table node tag into the template and drop it onto the appropriate empty line:
  11. <html>
    <body>
    <table>
    <tr>
    <td>
    <h1 style="text-align:center">
    Top 10 Products<br /br>
    with QlikView Heading
    </h1>
    %%CH184%%
    </td>
    <td>
    <h1 style="text-align:center">
    Top 10 Products<br /br>
    Hidden QlikView Heading
    </h1>
    %%CH184_1%%
    </td>
    </tr>
    </table>
    ...
  12. Expand the CH184_1 - Top 10 Products table node.
  13. Drag and drop each column, one at a time, onto the template in the appropriate HTML container.

    This third version of the CH184_1 - Top 10 Products table is reconstructed column-by-column in a separate HTML table. Each table heading and table data cell can have inline style elements added individually. The inline style elements for each table data cell will have an effect on the whole column below the heading.

  14. Add custom headings.

  15. Here is the HTML code for the reconstruction of the last version of CH184_1 - Top 10 Products in another table:

    <table>
    <tr>
    <th style="width:125px;">
    Product
    </th>
    <th style="width:60px;">
    Sales
    </th>
    <th style="width:60px;">
    Profit
    </th>
    <th style="width:100px;">
    Profit Percentage of Sales
    </th>
    </tr>
    <tr>
    <td>
    </td>
    <td style="width:125px;">
    %%ProductName_1%%
    </td>
    <td style="width:60px;">
    %%Total Sales_1%%
    </td>
    <td style="width:60px;">
    %%Gross Profit_1%%
    </td>
    <td style="width:100px;">
    %%GP%_1%%
    </td>
    <td>
    </td>
    </tr>
    </table>
    </body>
    </html>
Information note

Tables that have calculated dimensions or null values can be used as levels, but you cannot put any objects or levels inside them.

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.

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!