DroidDB Tip of the Month

DroidDB® Tip for January 2016

Calculating the Sum of a Column

You may want to calculate the sum of the values in a column. You can do this using a grid control.

To do this, do the following:

  1. On the desktop, open the form designer and open up the form.
  2. Select CONTROL | GRID to create a grid control.
  3. Turn on "Show all records" and press OK.
  4. Click "Add After".
  5. Select the name of the column you want to sum up in the "Name" dropdown.
  6. Select the variable to hold the result in the "Sum into" dropdown.
  7. Click OK to the Grid Column dialog.
  8. Click OK to the Grid Properties dialog.
  9. Resize the grid control so that it is very small. Alternatively, in the form's startup macro, hide the control.

When the form runs, the sum of the column will be calculated and be placed in the variable selected.

 

Back to List »

Visit our store

Top rated! I needed a solid database application development tool for mobile devices. I chose DroidDB for Android OS because it provided a way to get a strong product to market quickly. DroidDB is relational, gives me control over form layout, handles macros, and supports events. It works on all Android versions I have tried and is a great companion product to SYWARE’s VisualCE.

Mark Read, President
SyntegraTech, Inc.

signup for our newsletter