You can use the Grouping and Sorting dialog box to arrange your report in a particular order.

 

Note that the sample project Chapter11_Customizing.pnj contains a report called Report1 that you can use to try out the grouping and sorting commands outlined in this section. You can access this project by clicking File – Open Project in the application menu, then enabling the Open a sample project option.

 

To sort reports in descending order of a specific field

 

1.Click the Grouping & Sorting toolbar_icon_field_group_sort button on the toolbar.

2.In the first row of the Field/Expression column, select a value from the drop-down list.

3.In the first row of the Sort Order column, select Descending from the drop-down list.

4.In the first row of the Sorted column, select No from the drop-down list.

 

To sort reports in ascending order of a specific field

 

1.Click the Grouping & Sorting toolbar_icon_field_group_sort button on the toolbar.

2.In the first row of the Field/Expression column, select a value from the drop-down list.

3.In the first row of the Sort Order column, select Ascending from the drop-down list.

4.In the first row of the Sorted column, select No from the drop-down list.

 

Additionally, you can use a combination of ascending and descending selections on fields to sort your report. This can be done by creating additional rows in the Grouping & Sorting table.

 

grouping_sorting_dialog

 

For example, the Grouping & Sorting table shown above will result in a report where the records are sorted in ascending order (lowest to highest numbers) of CategoryID. Then, when one or more records contain the same value for CategoryID, the records are sorted in descending order (highest to lowest numbers) of Order_Number.

 

To delete a row from the Grouping & Sorting options

 

1.Right-click the row you want to delete.

2.Click Delete Row.

3.In the Delete Confirmation dialog box, click Yes.

 

To insert a row into the Grouping & Sorting options

 

1.Right-click the row below the point where you want to insert a row.

2.Click Insert Row.

 

To move a row up in the Grouping & Sorting options

 

1.Right-click the row you want to move up.

2.Click Move Up.

 

To move a row down in the Grouping & Sorting options

 

1.Right-click the row you want to move down.

2.Click Move Down.

 

As well, each row of the Grouping and Sorting dialog box has a corresponding Group Properties section, which appears when you select the row.

 

grouping_sorting_dialog_2

 

The Group Properties section allows you to further customize the settings for your groups:

 

Group Header

If you set this box to Yes a header section for the group will be created on the report. You can then add design components to this new section.

 

Group Footer

If you set this box to Yes a footer section for the group will be created on the report. You can then add design components to this new section.

 

Group On

You can use this drop-down list to set the value that determines when a new group is created. For example, you can choose to group on prefix characters (letters and numbers), time values (hours or minutes), or date values (year, quarter, month, week, or day).

 

Group Interval

You can use this box to set the value interval that determines when a new group is created. For example, if you set Group On to Prefix Characters, then set Group Interval to 3, a new group will be created each time the first three letters or numbers in the field change. That is, records where this field starts with the characters 555 will be in one group, records where this field starts with the characters 556 will be in another.

 

Keep Together

If you set this box to No, PEERNET Reports will make no effort to keep grouped data together on the same page. If you set this box to Whole Group, PEERNET Reports will attempt to keep entire groups together on the same page. If you set this box to Header with First Detail, PEERNET Reports will attempt to keep the report header and the first Detail section together on the same page.