Step 2 Group your Results

LANSA Client

Step 2. Group your Results

A group is a set of records that are related to each other in some way. In the files supplied for this tutorial, the records are related by country and warehouse.

1.Close the Results window and open the Field Conditions dialog using the   button on the toolbar.

2.In the list of Conditions, select the Sales country is equal to NZ and delete it.

3.Press the OK button to close the Field Conditions dialog.

4.Run the Query to produce results for all Sales Countrys, except US.

5.  Display the pop-up menu of available commands by clicking on the right mouse button.

6.  Select the Group By command to open the Group By dialog box. Alternatively, you could select it using the icon on the toolbar.

     All the fields defined for the query are displayed in the Query fields list in the Group By dialog box.

7.  You are going to group the data according to Sales Country.

a.  To do this, double-click on the Sales Country in Query fields or alternatively, select the Sales Country and click on the Add button. You will notice that Sales Country is immediately displayed in the Group By fields list.

8.  Select Summary Options apply to grouped fields option, to have the summary totals calculated for each group.

9.When done, press the OK button.

     The Results window will now show the new results.

10.Scroll through the Results window. You will see that there are additional rows for each Sales Country. This is the result of applying the grouping conditions.

  

     Notice that at the end of the results you still have the totals which apply to all the records in the query.

11.Go to Step 3. Contract and Expand your Results