Custom Reporting -- Creating Form Relationships

From IHRIS Wiki
Revision as of 11:20, 2 September 2009 by Litlfred (talk | contribs) (→‎Overview)

Overview

Intended Use

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 'position' 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_position' 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. Call is the 'supervisor'

Some Terminology

  • A relationship is some times referred to as a "form relationship" or a "report relationship"
  • The "primary_form" is the starting point in describing the form in your relationship.
  • A form can be referenced several times in a relationship. In the example above, the person_position form was referenced twice. Once we gave it the "report form name" 'person_position' and once we gave it the "report form name" 'supervisor_person_position'. Similarly, the person form was referenced twice and given the two distinct "report form names" of 'person' and 'supervisor'


Starting Out

Linking a Form

Limiting a Form

Adding in a SQL Function