Custom Reporting -- Creating Form Relationships

From IHRIS Wiki

Intended User

This is primarily intended for a developer or administrator of the system who has a good idea of how all the forms are related. The possible connections between the different forms are already mapped out in the system. A relationship is the description of a path between the various forms in the system.

A relationship is, at the moment, used for Custom Reports. We also intend to use it for Custom Pages.


Example

You may wish to create a form relationship in iHRIS Manage that describes all current employees, their salaries, and their supervisors. Here is an outline of how to define this relationship:

  • Start with the primary form 'person_position' and limit to those positions which the 'being_date' field is not null and the 'end_date' field is null.
  • Join to the primary form the 'person' form where the 'person' form is a parent of the 'person_position' form
  • Join to the primary form the 'salary' form where 'salary' is a child of 'person_position' and where the 'start_date' field for 'salary' is maximal
  • Join to the primary form the 'position' form where the field 'position' of the primary 'person_position' form maps to that position. Call this the 'employee_position' form.
  • Join to the 'position' form the 'person' form where the 'supervisor' field of the 'position' form maps to that position. Call this joined form the 'supervisor_position' to distinguish it from the 'employee_posititon' form.
  • Join to the 'supervisor_position' the 'person_position' form whose 'position' field is the value of 'supervisor_position' form. Call this the 'supervisor_person_position'
  • Join to the 'supervisor_person_position' form the 'person' form which is a parent of the form.

Terminology

  • A relationship is some times referred to as a "form relationship" or a "report relationship"

Overview

Starting Out

Linking a Form

Limiting a Form

Adding in a SQL Function