Skip Navigation
Online help
Sorting and grouping data in documents

Grouping records in a document
   - Including bookmarks in PDF
   - Changing the grouping order
   - Deleting a grouping field
   - Inserting page breaks between groups
   - Keeping a group together on a page
   - Repeating group headers
   - Restarting page numbers
   - Grouping Properties dialog box
Sorting objects
   - Sorting dialog box
   - Sorting Detail items
   - Sorting Grouping items
   - Switching the order of sort keys
Using Page-by
   - Disabling Page-by
   - Setting the Page-by mode
   - Exporting Page-by sections

Grouping records in a document
Grouping records can help you understand the data better. Grouping the data sets up a type of hierarchy within the document, and an inherent or implied sort order for the data in the document. The data is sorted first by the first field in the Grouping panel, then by the next field, and so on.

You can group on attributes, consolidations, and custom groups, but you cannot use metrics as grouping items.

To group records in documents:

  1. Open a document.
  2. If the Grouping panel is not displayed, select the Grouping icon  on the toolbar. The Grouping panel opens above the Layout area.
  3. In the Dataset Objects panel, select the object by which to group, and drag and drop it into the Grouping panel.
  4. A corresponding pair of Header section and Footer section is added to the Layout area.
    Note: The order of the document's grouping is determined by the order of grouping fields from left to right in the Grouping panel. That is, the document is grouped first by the leftmost object, then by the object to the right, and so on. To change the order, rearrange the grouping fields.

Including bookmarks in PDF
By default, each element of the grouping field becomes a bookmark in the PDF. The bookmarks allow you to navigate through a PDF by creating a Table of Contents for the file.

You can choose to not generate the PDF bookmarks. To do so, perform the following steps:

  1. Select Page Setup from the File menu.
  2. In the Page Setup dialog box, click the Document tab.
  3. Clear the Include Bookmarks in PDF check box.
Changing the grouping order
The document is grouped first by the object at the far left of the Grouping panel, then by the next object to the right, and so on. After you set up the grouping for a document, you can change the order simply by moving the fields in the Grouping panel. When you change the grouping order, the fields' corresponding header and footer sections in the Layout Area also change positions.

To change the grouping order:
  1. Open a document.
  2. If the Grouping panel is not displayed, select Grouping from the View menu. The Grouping panel, labeled as Grouping, opens above the Layout area.
  3. In the Grouping panel, do one of the following:
    • Right-click the grouping field to move. Select Move Right or Move Left.
    • Drag the grouping field right or left. A placeholder indicates where it is placed. Drop it in its new location.

Deleting a grouping field
If there is an item in the Grouping panel that you want to remove, you can delete it. Note that this action also removes its associated header and footer sections, along with their contents, and the grouping sort keys in the Sorting dialog box.

To delete a grouping field from the Grouping panel:

  1. Open a document in Design or Editable Mode.
  2. If the Grouping panel is not displayed, select Grouping from the View menu. The Grouping panel, labeled as Grouping, opens above the Layout area.
  3. In the Grouping panel, do one of the following:
    • Drag and drop the grouping item to Dataset Objects. Click the Remove icon next to the grouping item. (Note that this icon is only displayed when the Pivot Buttons option is selected from the View menu or on the toolbar.)
    • You can also right-click the grouping item and select Remove.

Inserting page breaks between groups
If you need to print a document and distribute sections (the Detail section, for example) of it to different people, you can add page breaks whenever a new section begins. For example, if your document were grouped by Region, you would want each region to start printing on a new page. To do this, you need to add a page break for the Region Header section in the Layout Area.

To add a page break between groups:

  1. Open the document and view it in Design Mode or Editable Mode. To view the document in one of these modes, select the mode from the View menu.
  2. Right-click the grouping field for which you want the page break and select Grouping Properties.
  3. In the Grouping Properties dialog box, select Page break between groups.
Keeping a group together on a page
At times you may want to keep a page break from occurring within a group (which includes everything from its group header to its footer). To do this, define that the group is kept together. If the group does not fit entirely on a page, it starts on a new page and any overflow prints on the following pages.

To keep a group together on a page:
  1. Open the document and view it in Design Mode or Editable Mode. To view the document in one of these modes, select the mode from the View menu.
  2. Right-click the grouping field whose elements you want to keep together and select Grouping Properties.
  3. In the Grouping Properties dialog box, select Keep group together.

Repeating group headers
Note:
This feature only applies to the PDF view or printout.

If all of the data within a group cannot fit on one page, you can set that group's header information to print on succeeding pages. This ensures that information is labeled, regardless of what page it appears on.

To repeat group header on all related pages:

  1. Open the document and view it in Design Mode or Editable Mode. To view the document in one of these modes, select the mode from the View menu.
  2. Click the title bar of the Header section of the grouping field for which you want header repeated.
  3. Select Properties from the Format menu.
  4. On the Layout tab, select Repeat on each page for the Page Break option.
Restarting page numbers
Note: This feature only applies to the PDF view or printout.

To reset page numbers for each group in the document:
  1. In the Grouping panel, right-click the grouping item and select Grouping Properties. The Grouping Properties dialog box opens.
  2. Select the Page break between groups check box.
  3. Select the Restart page numbering check box.

    Note: This also changes the value of the auto text code for total page numbers, which is normally the total number of pages in the document, to the number of pages in that group's section.

Grouping Properties dialog box
The Group Properties dialog box allows you to set properties for an individual group. These properties affect Interactive and View mode and the print-out in PDF (unless otherwise noted); they do not change the display in Design Mode.

To access the Group Properties dialog box, right-click a field in the Grouping panel and select Group Properties. This dialog box contains the following options:

  • Keep group together: When selected, page breaks are not allowed within the selected group, from its group header to its footer and all the content between them. By default, page breaks are allowed.
  • Page break between groups: When selected, each group begins on a new page. By default, groups are printed on the same page.
  • Restart page numbering: When selected, page numbering restarts for each group. By default, page numbering does not restart.
  • PageBy Mode: This option is only available in View mode. You can select one of the following options:
    • No Page-By (All Only): Disables Page-by. All the grouping fields are rendered on one page.
    • Page-By (Single Element Only): The Page-by drop-down list displays the selected grouping item only.
    • Page-By (Single Element or All): The Page-by drop-down list displays all the grouping fields available for Page-by.
  • Show (report object name) Header: Determine if the Header section is displayed.
  • Show (report object name) Footer: Determine if the Footer section is displayed.
Sorting objects
Sorting allows you to specify the order that the grouping items or dataset objects in a document are presented in, either ascending or descending. You can select what objects to sort, what to sort by, and the sorting order. Any object in the Grouping panel or in the primary dataset can be sorted. For example, you may want to sort the information in the document's Detail section. If you have a document grouped by Region and Year, you may want the records in the Detail section sorted by Revenue in descending order.

Note: The Sort by field is also referred to as a sort key.

Sorting dialog box
The Sorting dialog box allows you to sort the data for the Grouping and Detail sections of a document. You can select what objects to sort, the sorting criteria (for example, the attribute form on which to sort), and the sorting order (ascending or descending).
  • Grouping: When a grouping has been defined, it is automatically entered here. You cannot add an additional sort for the grouping section. Grouping items are sorted in the order they appear in the Grouping panel. To change that order, rearrange the objects in the Grouping panel.

    You can change what the object is sorted by, depending on whether it is an attribute, a custom group, or a consolidation. For more information, please refer to Sorting grouping objects.

    You can also change the Order of the sort from ascending to descending. However, you cannot change the Order if the object is a custom group or if the Criteria of an attribute is set to Default.
  • Detail: Sorting is not automatically defined for the Detail section of a document. You can select any desired object as long as it is in the primary dataset, regardless of where or whether it is placed on the document. Unlike grouping, you can select a metric as a Sort by object.

    You can define the sorting order by using up to three objects, if you have multiple objects listed. For more information, please refer to Sorting Detail items.

Sorting Detail items
To sort Detail items:

  1. Open a document.
  2. From the Data menu, select Sort Document. The Sort Document dialog box opens.
  3. In the Detail section, select objects from the drop-down list in the desired order.

    Note: You can only select a maximum of three objects.
  4. Select Ascending or Descending for each object.
Sorting Grouping items
To sort Grouping items:
  1. Open a document.
  2. From the Data menu, select Sort Document. The Sort Document dialog box opens.
  3. For each item in the Grouping section, select an option from the drop-down list.
    • If you are sorting on an attribute, you can choose which attribute form to sort on, Default, ID, or DESC. The form does not have to be displayed on the report.
    • If you are sorting on a consolidation, you cannot change the Criteria from Default.
  4. Select Ascending or Descending for each grouping item.
Switching the order of sort keys
To change the order of sort keys:
  1. Open a document.
  2. From the Data menu, select Sort Document. The Sort Document dialog box opens.
  3. In the Detail section, switch the order for the objects among the three options:
    • Sort by:
    • Then by:
    • Then by:

Using Page-by
You can use Page-by to interactively display groups on separate pages for printing in PDF.

For example, a document contains sales and profit data and is grouped by Year and then Region. By default, both Year and Region are included in the page. You can select a specific year and region to display the data for the selected years and region combination. You could also see the data for all regions for a particular year or all data in the document, regardless of year or region.

By default, Page-by is enabled for all the grouping fields in the document. You can group on attributes, consolidations, and custom groups, but not metrics. Therefore, you cannot page by metrics.


Disabling Page-by
To disable Page-by:

  1. Open the document and view it in Design Mode or Editable Mode. To view the document in one of these modes, select the mode from the View menu.
  2. Right-click a grouping item in the Grouping panel.
  3. In the Grouping Properties dialog box, select No Page-by as the Page-by Mode.
When you disable Page-by for a particular grouping field, any fields to the right of it in the Grouping panel are also disabled.

Setting the Page-by mode
The Page-by mode determines how or what grouping elements to display in the Page-by drop-down list in the Grouping panel.

To set the Page-by mode:
  1. Open the document and view it in Design Mode or Editable Mode. To view the document in one of these modes, select the mode from the View menu.
  2. Right-click a grouping item in the Grouping panel.
  3. In the Grouping Properties dialog box, select an option for the Page-by mode:
    • No Page-by: Disables Page-by. All the grouping fields are rendered on one page. Page-by (Single Element only): The Page-by drop-down list displays the selected grouping item only.
    • Page-by (Single Element or All): The Page-by drop-down list displays all the grouping fields plus All, which, when selected, makes all the grouping fields available for Page-by.

      Note: By default, the All option is selected.

Exporting Page-by sections
Perform the steps below to determine how the Page-by sections of a document are exported.

To configure export options for the Page-by sections within a document:

  1. Open the document to be formatted.
  2. From the Format menu, select Document Properties. The Document Properties dialog box opens.
  3. Select the Other tab.
  4. In the Default Page-By Export Mode options section, select one of the following: 
    • Entire Document: When you export your document, every page-by field in your document is exported.
    • Current Page-By Selection Only: When you export your document, only the currently revealed page-by section is exported.
  5. Select the Prompt User on Export when Page-By is enabled check box if you want to be prompted to select one of the Default Page-By Export Mode options after choosing to export a document. With this check box selected, when you export a document, a dialog box prompts you to choose to export either the entire document or the current Page-by selection only.
  6. Click OK to apply the changes and return to the document.