Skip to main content

FUNCTION

      Optional in column A = optional in Column A                                                                                                                                                

Parameter

Mandatory/Optional

Value (example)

Comment

FORMS

REPORT

FUNCTION

Optional in column A

Optional in column A

MAX, MIN, AVG

Default function is SUM. To override the default function used in the SQL query for each column, define another function such as MAX, MIN, AVG, or COUNT.

FUNCTION is an optional parameter in the template. When all SQL queries are run towards the database, the default aggregate function used is SUM for each data column. To override the default function, the keyword FUNCTION can be added in column A and another aggregate function such as MAX, MIN, or AVG can be defined for any of the data columns. The FUNCTION parameter can also be used in combination with the CONDITION keyword in order to state a having condition.

FUNCTION

Supported SQL aggregate functions:

  • SUM        = Returns the sum (default in Bizview).
  • MAX        = Returns the largest value.
  • MIN        = Returns the smallest value.
  • AVG        = Returns the average value.
  • COUNT = Returns the number of rows.

The FUNCTION keyword only needs to be used in the template if any other aggregate function than SUM should be used in a column.

The FUNCTION row should be defined with ROWTYPE = DESIGN (the row will be hidden when document is generated).

Was this article helpful?

We're sorry to hear that.