Perform Column and Row Aggregate on a grid.
dbAggregate = (~^:)Fields| AggType| BottomTemp| SumColHeader| HeaderTag| HeaderFormat| CellFormat ~ Repeat....
| Keyword | Description |
|---|---|
| Delimiters (~^:) | group; ^ = field; : = format of cell inside [[ ]]. |
| Fields | Fields or Cols of interest to perform Column and Row aggregate. |
| AggType | Aggregate type - SUM | AVG | MIN | MAX | COUNT. |
| BottomTemp | HTML template of bottom Row. |
| SumColHeader | Header of the row aggregate (right side). |
| HeaderTag | <TD> Tag of cell holding the aggregate. |
| HeaderFormat | Only one general format allowed in entire row aggregate. |
| CellFormat | Use IsNumeric() or Val() to test the cell value. IsNumeric("10 boxes")=0 while Val("10 boxes")=10. |
| CellFormat | Use IsNumeric() or Val() to test the cell value. IsNumeric("10 boxes")=0 while Val("10 boxes")=10. |
| [[GrandTotal:Format]] | A special tag in which the total of the row is deposited. |
The Super Aggregate function is simplified down to two properties. Note that a new parameter "Val" is implemented. This would take the Val(grid cell) instead of testing for IsNumeric. So, for a cell value of "10 boxes", user now have control whether to treat it as "10" (Val) or "0" (default - IsNumeric). That means all strings fields can be use in aggregate functions even if they come from a stored procedure! Super Aggregate functions include SUM, AVG, MIN, MAX, and Count (Excel style where blank=no count) in both Rows and Columns. The SUM aggregates of both rows and columns are exported for further processing - for instance, after the Aggregates produce the values for the grid, the same values could be used to produce a Chart. The dbAggregateExportTemplate property export these values in a 1D array which can then be retrieved using Tornado.GetData.CRSum(Unit) for further processing. For now, only SUM is supported.
z Class | Tornado Namespace | dbAggregateExportTemplate