Advanced Reporting 7: Including Employee Custom Fields in a Report
Introduction
This guide explains how to include employee custom field values-such as job title-into your report layout using the CustomFieldValue function.
Starting with a Basic Employee Report
Begin with a simple report that displays employee details. Preview the report to see the current output.
Adding a New Column for a Custom Field
- Switch back to Design View.
- Insert a new column into the existing table layout.
- Adjust column widths if necessary to make space for the new field.
Binding the Custom Field Value
- Label the new column Title (or another relevant custom field name).
- Select the corresponding detail cell.
- Open the Expression Editor.
- Use the CustomFieldValue function:
- First parameter: Employee Number
- Second parameter: the Custom Field Name (e.g., Title)
- Example expression format:
CustomFieldValue([EmployeeNumber], "Title") - Click OK to apply the expression.
Previewing the Report
- Save your changes.
- Preview the report again.
- You should now see the Title column populated for employees who have that custom field value.
Conclusion
You've now added a custom employee field to your report using a simple function. This approach works for any other custom field value you may need to display in a report layout.