Skip to main content
Pentaho Documentation

Create an Index

You must have a report file open in order to proceed.

The Index feature is similar to a sub-report. It allows you to generate an index based on fields, (or groups), in your report. When the index is generated, it displays the instances and page number in which the field name appears.

Follow the instructions below to create an index.

  1. Click and drag the index icon onto the report canvas. You are prompted to make the index element Inline or Banded. Choose one. Inline sub-reports can be placed side-by-side with other elements (even other sub-reports). Banded sub-reports occupy a variable height, but 100% of the report page width, so they cannot be on the same line with other elements.
  2. Click the index element; under Attributes, double-click data-field and select the field to which you want to map. In the example below, the data-field is mapped to PRODUCT NAME. File:/rd_index_data_field.png
    • data-field — Defines the field to be used as the item-data or item-key.
    • data-formula — Defines an open formula to be used as the item-data or item-key.
      Important: Make sure that data-field is not defined, if this is used.
    • index-separator — Defines the separator text that is used between page numbers in the item-pages field in the index sub report. It defaults to ",".
    • condensed-style Define whether a "-" is used between continuous page numbers; example, 4,5,6,7 would display as 4-7.
  3. Double-click the index element. A new sub-report tab opens.
  4. In the new report tab, create the appropriate index heading. Add the item-data and item-pages functions to generate the index data field name and page numbers. Keep in mind that all your entries will be included in the parent report. When you are finished, switch back to the main report tab.
  5. Preview your report.
    Note: The index appears on the last page of your report.
You should now have an index embedded in your current report.