Qlik NPrinting features for creating Excel reports

The following examples demonstrate Qlik NPrinting capabilities when creating Excel reports using QlikView objects. You can also use Qlik Sense objects.

  • Three QlikView objects will be embedded in an Excel report; two as images and one as a table.
  • The Quarter level and <Quarter> tag will be added to cycle at the quarters level with headings.
  • Pages and the page variable tag will then be added to the report, so that the Excel report has three pages with titles.

Create a 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. In this case, enter Excel report features overview.
  3. Select Excel in the Type drop-down list.
  4. Select Sales Demo in the App drop-down list.
  5. Click Create.
  6. Click Edit template to open the Template Editor.

Add QlikView objects as images

You can import QlikView object as images. The final report will include an image for each QlikView object. The images will appear the same as the originals. For example, if the original QlikView object has a side scroll bar, you will see it in the report. You can also import entire QlikView sheets as images.

Data included in objects that are imported as images will not be editable in the final report.

Do the following:

  1. Right-click the Images node, and then select Add objects.
  2. Select the QlikView objects CH318 and CH317 in the Select Objects window to be embedded in your template as images.

  3. Click OK.
  4. Expand the Images node in the left pane by clicking the + , if necessary.
  5. Drag the CH318 and CH317 node tokens into the template one at a time and drop each into its own cell.

    Images can be embedded side-by-side as well.

  6. Click Preview in the Actions group to see the result in the native output format of the template.
  7. Close the template, and then edit the template if necessary.

    You can click the down arrow in the Preview icon to preview a particular output format.

Add QlikView objects as tables

QlikView objects added as tables can appear exactly the same as in QlikView, or formatting can be modified partially or completely. The data is modifiable.

Do the following:

  1. Right-click the Tables node in the left pane.
  2. Select Add objects.
  3. Select CH319 in the Select Objects window.
  4. Click OK.

Embed a QlikView object as a table

Qlik NPrinting will keep the format of the original QlikView table.

Do the following:

  1. Expand the Tables node in the left pane by clicking the + , if necessary.
  2. Drag and drop the CH184 node token into an empty cell in the template below the image tags.
  3. Click Preview to run a new preview.
  4. Close the template, and then edit the template if necessary.

Pivot tables do not have component nodes, while straight table nodes can be expanded to show their component column nodes. These column nodes can be embedded individually or used as components of a different table.

Add a level

Levels create tables and charts that are cycled through the values of the level field. The results for each level field value are displayed in order.

You can add QlikView fields to the Levels node. You can also add QlikView objects, which are cycled through the rows of the added object.

Do the following:

  1. Right-click the Levels node, and then select Add levels.
  2. Select Quarter from the Select Levels list.

  3. Click OK.
  4. Drag the Quarter_Level node token into the template, and then drop it onto three vertically-consecutive, empty cells.

Levels can be nested to create more complex structures.

Reposition Quarter_Level tags to define range

  1. Move the level tags in order according to the following rules:
    • The <Quarter_Level> opening tag must be in a row above all the rows containing tags to be cycled in the level. It must also be in a column to the left of, or the same as, any column containing tags to be cycled in the level.
    • The </Quarter_Level> closing tag must be in a row below all rows containing tags to be cycled in the level.
    • Any empty rows included in the level range will be present in the report, except for the rows containing the level tags. Those will be deleted.
    • You can verify the level range by clicking on the level node. The level range will be outlined and highlighted.
  2. Expand Quarter_Level node in the left pane by clicking the +, if necessary.
  3. Drag the Quarter node token into the template and drop it into an unoccupied cell.

The Quarter tag will display as the quarter relevant to the data displayed in the charts and tables. Format as you prefer using Excel formatting features.

Preview results

Do the following:

  1. Click the Preview icon to see the report with Quarter levels.
  2. Close Excel and proceed.

Multi-page publishing: select a page

You can create an Excel worksheet for each value of a QlikView field by adding it to the Page node. The page feature will be applied to the worksheet that is active at the moment that you add the field to the node.

You can apply only one page to each worksheet. If you want to create a worksheet for each combination of two fields, you must create a new QlikView field by concatenating the original fields and adding it to the Page node. You can add different pages to different worksheets in the same report.

For example, to produce a page for each year, do the following:

  1. Right-click the Page node, and then select Add page to current sheet
  2. Select the Year page from the list in the Select page window.
  3. Click OK.
  4. You can check the objects included in the page by clicking the Year_Page node.

    The page range will be outlined and highlighted.

    Note: Note that the tag that you click on in the tree view must be contained in the active worksheet. You cannot use the tree view to search for a specific page tag in another worksheet. Use the Excel search feature instead.
  5. Expand the Page node in the left pane by clicking the +.
  6. Expand the Year_Page node in the left pane by clicking the +.
  7. Drag and drop the Year node token into an empty cell in the template. Format it as you prefer.

    Your report will now be produced with a page for each year with the year as title.

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 information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?