View Using Aggregate Data Function in Custom Grids
Using Aggregate Data Function in Custom Grids
As soon as you begin building custom grids, you will want to start adding totals to your displayed results: Total Passengers, Total Fares, Number of Reservations, etc. This is fairly easily accomplished by adjusting the Grid Layout. This article assumes you have already learned how to open and create a new grid.
Open grid that you wish to edit and then right click one of the grid column headers (example Fare column) and select Grid Layout. (NOTE: By right clicking on the Fare Column header, grid layout opens with the Fare item automatically selected for you.)
Most likely, and by default, Fare values in your grid are displayed as whole numbers and are left justified in the grid. First thing to do is adjust the display and formatting of the fare numbers:
Next Step is to add the totals:
OK… so now you have the totals displayed… but you dont always want to have to scroll all the way down to the bottom of the grid in order to be able to see them… it would be nice to have the total row displayed at the top, as the first row of your grid. Here is how to achieve this:
You can repeat the process above with other numeric columns as well, such as Passengers, Alt Passengers, Surcharges, etc.
You can also use the Aggregate function COUNT which will tell you how many items are displayed in the grid.
For example, if in the ID field, you add the Aggregate Function = Count, then you will see the Number of Reservations listed in the Total Row, at the top or bottom of the grid.