Previous page

Next page

Report Designer - GlobalFunctionActualFieldName

Summary

Click this function to display the function statement in the bottom-left section.

Edit the GlobalFunctionActualFieldName global function first. This function calculates the actual field name that the data is grouped by.

It states that if the global variable (which stores the user's selection) equals the table and field names used in this statement, then store the field name. This statement is repeated for all sorting option fields.

Procedure

In Exercise 5, you will add the functionality to sort by Work Area. The WorkArea field does not exist in this statement, so use the following procedure to add it.

  1. Highlight a section of the statement from “else if…” to the next “…end” as shown below.

    GlobalFunctionActualFieldName

  2. Press Ctrl+C to copy this section of the statement.
  3. Click after an end statement.
  4. Press Enter to create a new line.
  5. Press Ctrl+V to paste your new section into the statement.
  6. On the first line of the new section, replace the table and field names with the ones that you require. For example, replace 'DEPARTMENT.DEPARTMENTCODE' with 'WORKAREA.WORKAREACODE'.
  7. On the second line, add the actual field name you require. For example replace 'DEPARTMENTCODE' with 'WORKAREACODE'.
  8. Right-click the statement and select Compile to check that your statement is correct.
    Messages are displayed at the bottom of the window.

    Important: You must resolve all errors before you can continue.

    You have added the WORKAREA.WORKAREACODE field. You need to repeat this procedure to add the WORKAREA.DESCRIPTION field. The actual field name will be Description (6).

Previous page

Next page