Default language.

Sorting and grouping results by a parameter


If the results of a report are random, you can sort or reorder the data by a parameter. Using the parameters used in Editing-report-parameters-to-filter-web-report-results, this example sorts the results in the left column by Status.

To sort results by a parameter

  1. On the Layout tab of the layout editor for the report, open the Data Explorer tab, and double-click a data set under the Data Sets node.
  2. In the Edit Data Set dialog box, click the Sorting tab.
  3. Click Add.
  4. In the Available Fields dialog box, select the fields you want to sort by in the report, and click OK.
    For example, select the Status and Assignee Groups fields.
  5. Preview the report to make sure the report is sorted by the parameter you added to the Sorting tab.
    1. Save the report.
    2. Run the report.
    3. Close the report after reviewing its content.
  6. If the report is not sorted as expected, review step 2 through step 4.

To group results by a parameter

  1. Go to the Layout tab of the layout editor, select the Table icon of the table, right-click the table header row, and select Insert Group.
  2. In the New Group dialog box, in the Group On list, select the parameter with which you want to group the results, and click OK.
  3. Preview the report to make sure the results are grouped by the parameter you configured in the New Group box.
    In the following figure, the report is grouped and sorted by the Status parameter. The first Assigned row has no data, and the next Assigned rows contain records. The first In Progress row has no data, and the following In Progress rows contain records.
    Sort and group.png
  4. To apply a style to the group header, go back to the report file in the Layout tab, and right-click the group header row.
  5. Select Style > Apply Style > bmcReportTheme:GroupHeader1.
  6. Preview the report (save, run, and close the report) to check the group header style.

To aggregate results by a parameter

You can configure your report results to display aggregated data. In other words, instead of displaying simple values, you can perform calculations on sets of values. This procedure shows you how to configure a report that counts the number of incidents.

  1. On the Layout tab of the layout editor, select the Table icon, right-click a cell in a Table Group-Header row, and select Insert > Aggregation.
    Sort2.png
  2. In the Aggregation Builder dialog box, configure a report row by completing the following steps:
    1. From the Function list, select COUNT.
    2. From the Expression list, select Incident Number.
    3. Click OK.
  3. Preview the report (save, run, and close the report).
    This report groups results by the parameter you configured in the New Group box, and displays the number of incidents in the Table Group Header row for incidents with Assigned and In Progress.

    Sort4.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*