Adding tables of contents to PixelPerfect reports

In PixelPerfect reports, you can add a table of contents that is linked and automatically updated. A table of contents can also be added to existing PixelPerfect reports. You should create a report as described in Adding totals and subtotals to PixelPerfect reports before performing the procedures on this page.

Create new PixelPerfect report with two levels

You can create a new PixelPerfect report with Year and CategoryName levels by repeating the process explained in Adding totals and subtotals to PixelPerfect reports. Level values will be rows of table of contents.

Do the following:

  1. Select Reports in the Qlik NPrinting main menu, and then click Create report.
  2. Enter a Title for the report. PixelPerfectReport with Table of Contents.
  3. Select PixelPerfect from the Type drop-down list.
  4. Select an app from the App drop-down list.
  5. Click Create to create the report.
  6. Click Edit template to open the Template Editor.
  7. Right-click the Levels node, and then select Add levels.
  8. Select the Connection to the QlikView document that contains the object you want.
  9. Select Year from the objects list.
  10. Right-click Year_Level, click Add levels, and then select the CategoryName field.
  11. Right-click CategoryName_Level, click Add levels, and then select the CH184 chart.
  12. Right-click the Detail band, select Insert Detail Report, and then click Year_Level.
  13. Drag and drop the Year field from the Levels node to the Detail1 band.
  14. Format the cell as you prefer.
  15. Right-click the Detail1 band, select Insert Detail Report, and then click CategoryName_Level.
  16. Drag and drop the CategoryName field from the Levels node to the Detail2 band.

  17. Format the cell as you prefer.
  18. Right-click the Detail2 band, select Insert Detail Report, and then click CH184_Level.
  19. If necessary, expand all Levels node details, and then select the CH184 columns, and then drag and drop them in the Detail3 band.

    Format created cells as you prefer, and then remove the white space under the cells.

  20. Select the CH184 columns by keeping Shift pressed, and then do a right-click and drag and drop the columns on the bottom of band Detail 2. This creates table headers.
  21. Format the created cells as you prefer.
  22. Right-click the Detail3 band, select Insert Band, and then click on GroupFooter.
  23. Add Total Sales and Gross Profit totals to the GroupFooter1 band as explained in Adding totals and subtotals to PixelPerfect reports.
  24. Click Save to save the template.

Create primary and secondary bookmarks

The first task is to set the headings as bookmarks. Year will be the primary bookmark and Category Name will be the secondary bookmark.

Do the following:

  1. Select the Year heading in the Detail1 range.
  2. Find the Data group in the Property Grid in the left lower pane.
  3. Expand the (Data Bindings) and Bookmark nodes.
  4. Select the Binding node.
  5. Open the Binding drop-down list by clicking on the down pointing triangle at the extreme right of the Binding field.
  6. Expand the Levels and Year_Level nodes.
  7. Select the Year node by clicking on it.

    This procedure creates a top level bookmark.

  8. Select [CategoryName_Level.CategoryName] in Detail2.
  9. Repeat step 1-8, adding the expansion of the CategoryName_Level node and clicking the CategoryName node instead.

Begin defining bookmark hierarchy

This procedure defines this level as a child of Detail1. The table of contents will be indented at this level.

Do the following:

  1. Scroll down the Property Grid until you reach the Navigation group.
  2. Select Parent Bookmark.
  3. Open the Parent Bookmark menu by clicking on the triangle pointing downwards at the far right of the Parent Bookmark field.
  4. Expand the DetailReport and Detail1 nodes.
  5. Select the Label1 node by clicking on it.

    The Year cell in the template will be highlighted.

Create ReportHeader bar

The table of contents must be in the ReportHeader.

Do the following:

  1. Right-click the Detail bar.
  2. Select Insert Band.
  3. Click on ReportHeader.

    This creates the ReportHeader bar and range.

Insert the table of contents into the Report header

Do the following:

  1. Drag the Table of Contents icon from the ToolBox on the right into the template, and then drop it into the ReportHeader range.

Customize table of contents fonts

Do the following:

  1. Widen the Property Grid on the left side of the window.
  2. Go to the Behavior group.
  3. Expand the Level Default node.
  4. Click on the browse button at the far right of the Font field.
  5. Set the Font to Arial, Regular, and 11pt, and then click on the OK button.

    This sets the font for the rows in the table of contents.

  6. Expand the Level Title node.

    This sets the font for the table of contents title.

  7. Set the Font to Arial, Bold and 12pt, then click on the OK button.

Customize table of contents title

Do the following:

  1. In the Behavior section of the Property Grid, expand the Level Title node.
  2. Enter Table of Contents in the Text form.

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?