Performing Global-Level Functions

The Global Level Functions object enables you to add elements to your report data set at the top report level.

You can add the following types of elements as top-level data:

  • Elements based on aggregate functions

  • Elements based on expressions

  • Elements based on PL/SQL statements (for Oracle Database data sources)


If you select a data type of Integer for any calculated element and the expression returns a fraction, the data is not truncated.

The Global Level Functions object is shown below. To add elements based on aggregate functions, drag the element to the "Drop here for aggregate function" space of the object. To add an element based on an expression or PL/SQL, click Menu, and choose the appropriate action.

Adding a Global-Level Aggregate Function

You can add global-level aggregate functions based on selected elements.

Available functions are as follows:

  • Count

  • Average

  • First

  • Last

  • Maximum

  • Minimum

  • Summary

  1. Drag and drop the data element from the data set to the Drop here for aggregate function area of the Global Level Functions object.

    For example, the image below shows creating a global level aggregate function based on the Salary element.

  2. When you release the mouse, the data model editor assigns a default name to the aggregate element and assigns Count as the default function.

    The figure below shows the function for the new global level element CS_1 being modified from Count to Average.

  3. Click the function icon to the left of the new element name and choose the function from the list.
  4. To change the default name, click the actions icon to the right of the element name and click Properties to launch the Edit Properties dialog. See Setting Element Properties for more about the properties available on this dialog.

Adding a Group-Level or Global-Level Element by Expression

You can add group-level or global-level aggregate functions by expressions.

  1. To add a group-level element, on the Group object, click Menu and select Add Element by Expression.
  2. In the Add Element by Expression dialog, enter fields and operators.
  3. In the Display Name field, enter a name that is meaningful to your business users.
  4. (Optional) Select a data type.
  5. Use the shuttle arrow to move the data elements required for the expression from the Available box to the Expression box.
  6. Click an operator to insert it in the Expression box, or choose from the function list.
  7. Click Validate Expression to validate the expression.

Adding a Global-Level Element by PL/SQL

The PL/SQL function must return a VARCHAR data type.

  1. On the Properties page, specify the PL/SQL Package as the Oracle DB Default Package in the data model properties. .
  2. On the Global Level Functions object, click Menu, and then click Add Element by PL/SQL.
  3. In the Add Element by PL/SQL dialog, enter the following fields:
    • Name - Enter a meaningful name for the element.
    • Display Name - Enter a display name. This appears in the report design tools. Enter a name that is meaningful to your business users.
    • Data Type - Select String.
  4. Select the PL/SQL package from the Available box and click the shuttle button to move the function to the Group Filter box.