Example - Add a Table of Contents to a Report

You are a report author at The Sample Outdoors Company, which sells sporting equipment. You are requested to add a table of contents to an existing report so that users can more easily navigate your report.

Procedure

  1. Open IBM® Cognos® Report Studio with the GO Data Warehouse (analysis) package.
  2. Open the Budget vs. Actual sample report from the Report Studio Report Samples folder.
  3. Create the report pages:
    • Pause the pointer over the page explorer button page explorer icon and click Report Pages.
    • Click Page1, and then, in the Properties pane, set the Name property to Budget vs. Actual Sales.
    • Click the Budget vs. Actual Sales page and, from the Edit menu, click Copy.
    • From the Edit menu, click Paste to paste the copy of the page in the Report Pages pane.
    • Select the new page, and in the Properties pane, set the Name property to Table of Contents.
    • In the Report Pages pane, drag the Table of Contents page to the top of the list.
  4. Pause the pointer over the page explorer button and click Table of Contents.
  5. Delete the crosstab object:
    • Click somewhere in the report page.
    • In the Properties pane, click the select ancestor button select ancestor icon and click Crosstab.
      Tip: You can also click the container selector (three orange dots) of the crosstab to select it.
    • Click the delete button delete icon.
  6. Select the Camping Equipment block object and click the delete button.
  7. Double-click the report title, type Table of Contents, and click OK.
  8. From the Toolbox tab toolbox tab, drag a Table of Contents object onto the page.
  9. Pause the pointer over the page explorer button and click Budget vs. Actual Sales.
  10. From the Toolbox tab, drag a Table of Contents Entry object to the left of each region.
  11. Pause the pointer over the page explorer button and click Table of Contents.
  12. Double-click the first entry in the table of contents, type Americas, and click OK.
  13. Rename the other table of contents entries as Asia Pacific, Northern Europe, Central Europe, and Southern Europe.
  14. Save the report.
  15. Number the table of contents entries:
    • From the Toolbox tab, drag a Layout Calculation object to just before the word Americas.
    • In the Report Expression dialog box, on the Functions tab functions tab, expand the Report Functions folder and double-click the TOCHeadingCount expression.
    • At the end of the expression definition, type 1) and click OK.
    • Repeat the previous three steps to add layout calculations before the other table of contents entries.
    • Ctrl+click only the five table of contents entries and not the five layout calculations.
    • In the Properties pane, double-click the Padding property and set the left padding to 10 px.
  16. Change the color of table of contents entries:
    • Ctrl+click the five layout calculations, the five table of contents entries, and the five page number calculations.
    • In the Properties pane, double-click the Foreground Color property and set the foreground color to blue.
  17. Add links to the table of contents from another page:
    • From the Toolbox tab, drag a Bookmark object to just before the title.
    • Select the bookmark and, in the Properties pane, double-click the Label property, type TOC, and click OK.
    • Pause the pointer over the page explorer button page explorer icon and click Budget vs. Actual Sales.
    • From the Toolbox tab, drag a Text Item object to the right of the crosstab object.
    • In the Text dialog box, type Return to the Table of Contents and click OK.
    • Right-click the text object and click Drill Through Definitions.
    • Click the add button add icon.
    • On the Bookmark tab, in the Source Type list, click Text.
    • Click the ellipsis button, type TOC, and then click OK twice.
  18. Save the report.
  19. Click the arrow to the right of the run report button run report icon and click Run Report - PDF.

Results

On the first page, the table of contents appears. Clicking a region brings you to the corresponding page in the report. You can return to the table of contents by clicking Return to the Table of Contents at the end of the last page.
an example report showing five regions and their page numbers