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.

Testing

You can use our sample files to create your app. To download these files, see: Sample files.

Adding tables to an HTML template

Do the following:

  1. Click Edit template to open the Template Editor.

  2. Right-click the Tables node, and select Add objects.
  3. Select an object from the list.

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

  7. Drag the 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>
                         		%%yourtableobject%%
                         </td>
                         <td>
                         		 <h1 style="text-align:center">
                           	  Top 10 Products<br> </br>
                           	  Hidden QlikView Heading
                         		 </h1>
                           </td>
                        </tr>
                    </table>
    		...

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

  8. Add the same table to the template again.
  9. Open the Properties pane for the new table object, and then set the Show Headers property to Hide.
  10. Drag the table node tag into the template and drop it onto the appropriate empty line:

    <html>
       	<body>
        		<table>
        			 <tr>
          				<td>
           				<h1 style="text-align:center">
            				Top 10 Products<br /br>
            				with QlikView Heading
           				</h1>
            				%%yourtableobject%%
          				</td>
          				<td>
          					 <h1 style="text-align:center">
            				  Top 10 Products<br /br>
            				   Hidden QlikView Heading
          					 </h1>
           				%%yourtableobject_1%%
          				</td>
         			</tr>
        		</table>
        ...
  11. Expand the table node.
  12. Drag and drop each column, one at a time, onto the template in the appropriate HTML container.

    This third version of the 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.

  13. Add custom headings.

  14. 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

You can use QlikView objects that have calculated dimensions or null values as levels. However, you cannot nest other objects inside them, except for fields from that sheet object. Qlik Sense visualizations with calculated dimensions cannot be used as levels.

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.

Learn more

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!