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:
- Select Reports in the Qlik NPrinting main menu, and then click Create report.
- Enter a Title for the report. PixelPerfectReport with Table of Contents.
- Select PixelPerfect from the Type drop-down list.
- Select an app from the App drop-down list.
- Click Create to create the report.
- Click Edit template to open the Template Editor.
- Right-click the Levels node, and select Add levels.
- Select the Connection to the QlikView document that contains the object you want.
- Select Year from the objects list.
- Right-click Year_Level, click Add levels, and then select the CategoryName field.
- Right-click CategoryName_Level, click Add levels, and then select the CH184 chart.
- Right-click the Detail band, select Insert Detail Report, and then click Year_Level.
- Drag and drop the Year field from the Levels node to the Detail1 band.
- Format the cell as you prefer.
- Right-click the Detail1 band, select Insert Detail Report, and then click CategoryName_Level.
-
Drag and drop the CategoryName field from the Levels node to the Detail2 band.
- Format the cell as you prefer.
- Right-click the Detail2 band, select Insert Detail Report, and then click CH184_Level.
-
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.
- 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.
- Format the created cells as you prefer.
- Right-click the Detail3 band, select Insert Band, and then click on GroupFooter.
- Add Total Sales and Gross Profit totals to the GroupFooter1 band as explained in Adding totals and subtotals to PixelPerfect reports.
- 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:
- Select the Year heading in the Detail1 range.
- Find the Data group in the Property Grid in the left lower pane.
- Expand the (Data Bindings) and Bookmark nodes.
- Select the Binding node.
- Open the Binding drop-down list by clicking on the down pointing triangle at the extreme right of the Binding field.
- Expand the Levels and Year_Level nodes.
-
Select the Year node by clicking on it.
This procedure creates a top level bookmark.
- Select [CategoryName_Level.CategoryName] in Detail2.
- 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:
- Scroll down the Property Grid until you reach the Navigation group.
- Select Parent Bookmark.
- Open the Parent Bookmark menu by clicking on the triangle pointing downwards at the far right of the Parent Bookmark field.
- Expand the DetailReport and Detail1 nodes.
-
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:
- Right-click the Detail bar.
- Select Insert Band.
-
Click on ReportHeader.
This creates the ReportHeader bar and range.
Insert the table of contents into the Report header
Do the following:
- 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:
- Widen the Property Grid on the left side of the window.
- Go to the Behavior group.
- Expand the Level Default node.
- Click on the browse button at the far right of the Font field.
-
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.
-
Expand the Level Title node.
This sets the font for the table of contents title.
- Set the Font to Arial, Bold and 12pt, then click on the OK button.
Customize table of contents title
Do the following:
- In the Behavior section of the Property Grid, expand the Level Title node.
- Enter Table of Contents in the Text form.
Preview and save
Do the following:
- Click Preview.
- Check the report, close it, and then edit the template again if necessary.
- Click Save and Close to save the template and close the Template Editor.