Skip to main content Skip to complementary content

Creating one or more levels in Excel reports

In Qlik NPrinting you can create Excel reports containing one or more levels.

In this example, all QlikView objects inserted between the level opening and closing tags will be repeated in the final report, one time for each value present in the QlikView object that you added to the Levels node. Levels can be nested to create complex hierarchies.

We are going to embed one QlikView object as a table and one as an image in an Excel report. We are then going to select two fields as levels so that the Excel report presents three tiers of information with titles and headings.

Create new Excel 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: Excel report with levels.
  3. Select Excel from the Type drop-down list.
  4. Select an app from the App drop-down list. For example, select Sales Demo.
  5. Keep the Enable check box selected.
  6. Click Create to create the report.
  7. Click Edit template to open the Template Editor.

Import QlikView object as image

Do the following:

  1. Right-click the Images node, and then select Add objects.
  2. Select the Connection to the QlikView document that contains the object you want. For example, select Sales Demo.
  3. Select CH319 from the objects list.
  4. Click OK.

Add QlikView object as table

Do the following:

  1. Right-click the Tables node, and then select Add objects.
  2. Select CH318 as a table.
  3. Click OK.
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.

Add a level by 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.
Tip note

You can select more than one field that you want to cycle by using Ctrl + click.

Add a level by category

Do the following:

  1. Right-click the Levels node, and then select Add levels.
  2. Select CategoryName field in levels list.
  3. Click OK.

Embed image and table in template

Do the following:

  1. Expand the Images and Tables nodes.
  2. Drag and drop the CH318 and CH319 tokens into empty cells.

    Make sure that you place the CH319 tag on the same line as the tags for CH318.

  3. Expand the Levels node in the left pane by clicking on the + to its left, if Year_Level and CatagoryName_Level nodes are not visible.
  4. Drag and drop the Year_Level token into empty cells.
  5. If you want to include a dynamic Year heading for the level cycle, do the following:

  6. Expand the Year_Level node, if the Year node is not visible.
  7. Drag and drop the Year node token into an empty cell.
  8. Open the Excel Ribbon by clicking on Toolbar icon, if it is not already open.
  9. Apply appropriate formatting to the Year tag.

Position level tags

Do the following:

  1. Drag and drop, or cut and paste, the Year_Level opening and closing tags to position the tags so that the opening level tag <Year_Level> is in a row above all rows to be repeated in the level cycle, and is in the same column or a column to the left of any and all columns to be repeated in the level cycle. Empty rows included in the level range will be reproduced in the level cycle.
  2. The closing level tag </Year_Level> must be in a row below any and all rows to be included in the level cycle.

  3. Verify the elements to be cycled in the level by clicking on the Year_Level node in the left pane. The level range becomes delimited and highlighted.

Apply second level

Do the following:

  1. Drag and drop the CategoryName_Level token into an empty cell at the top of a group of three vertically contiguous empty cells. Its current three cell range is delimited and highlighted.
  2. Position the level tags as described in the Position the Level Tags section above, and verify the extent of the level range.
  3. If you want to include a dynamic CategoryName heading for the level cycle, do the following:

  4. Expand the CategoryName_Level node in the left pane by clicking on the + to its left, if the CategoryName node is not visible.
  5. Drag and drop the CategoryName node token into an empty cell.
  6. Open the Excel Ribbon by clicking on the Toolbar icon.
  7. Apply appropriate formatting to the CategoryName tag.

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!