Cognos Table of Contents Object

Sometimes when you create large (PDF-) documents with Cognos, it can be useful to add a table of contents at the beginning. For this Cognos supports a special toolbox object (since version 8.3). Unfortunately this object only works for PDF reports.

First of all we need a report with multiple pages. We create a report with a repeater table. Within this repeater table we create a simple list. This list contains all articles of a product group. We also put the product group label in the repeater table above the list. The result should look similar to this:

Fig1.: Repeater Table with inner list

Fig1.: Repeater Table with inner list

 

 

 

 

 

 

 

 

Now we create on a separate page (we put this page in front of the report main page) the table of content. For that we just put the table of content object on the report page. It should look something like that:

Fig2.: Table of contents

Fig2.: Table of contents

 

 

 

 

 

 

The second step is to put the “entry of table of content” object in front of the product group label on the report page. So go to the report page and add the entry as described in the screenshot:

Fig3.: Table of contents entry

Fig3.: Table of contents entry

 

 

 

 

 

 

 

 

Now go back to the TOC page. There you have to change the text source on the entry in the table of contents. Switch the source type property to “Date item value” and then select the Productline. It should look like this:

Fig4.: Change Data Item Value for TOC entry

Fig4.: Change Data Item Value for TOC entry

 

 

 

 

 

 

Now your report is ready to be tested. Keep in mind that you run it as PDF output, otherwise you won’t see anything in the table of contents.

This was a very simple table of contents. If you want to create a table of contents based on your products instead of productlines you can unlock the report view and then move the “entry of table of content” element in the products column. Furthermore you have to change the data item in the table of contents entry to product now and you table of contents is created based on the products.

You can also create some kind of structured table of content where you have entries for product groups and products just by combining both methods and using the “Heading Level” property on the entry in the TOC.

I hope this article gave you an overview how to easily build table of contents in Cognos.

If you are interested in this or other advanced Cognos/SQL topics you can also attend training on my corporate homepage. At the moment my open courses are only available in German. Inhouse training and online courses are also available in English language. So check out my open trainings (German) or my online courses (English)!

Share and Enjoy: Diese Icons verlinken auf Bookmark Dienste bei denen Nutzer neue Inhalte finden und mit anderen teilen können.
  • LinkedIn
  • XING
  • Facebook
  • Google Bookmarks
  • Twitter

2 Kommentare

  1. Adolfo sagt:

    Excelente post.
    Saludos desde México.

  2. Bill Swenson sagt:

    Is there any way to control the format of the Table of Contents? It seems to be double spaced and i end up with a 25 page table of contents.

    Thanks!

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *