·   Wiki Home
 ·   Wiki Help
 ·   Categories
 ·   Title List
 ·   Uncategorized Pages
 ·   Random Page
 ·   Recent Changes
 ·   RSS
 ·   Atom
 ·   What Links Here

Active Members:



Create or Find Page:


View Using Aggregate Data Function in Custom Grids

Category:HWeb Dispatcher

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:

Scroll a couple columns to the right and locate Data Alignment.
Change this to Right Center  (Right justified, Centered top to bottom in the cell)
Next column is Data Format.
Enter 0.00
Click Apply and then look at how the fares are now displayed.

Next Step is to add the totals:
Scroll several more columns to the right and locate the column  Aggregate Function.
Change from None to Sum (You wish to find a total sum of all fares displayed in the fare column).
Next column is Aggregate Data Format
Enter 0.00
Click Apply and OK buttons
Scroll to the bottom of your grid and you will now see your Total Fare Amount displayed.

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:
Right Click any one of the grid column headers
Select Grid Properties
Select the Colors and Font tab
Locate the Description titled:   Total postions
Change the Value from  "Below" to  "Above"
(note - there are other Total Row settings you can adjust here, if desired).
Click OK
Save your Grid Changes.

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.