Custom Reporting -- Creating a Staff List Example - ES: Difference between revisions

From IHRIS Wiki
No edit summary
Line 4: Line 4:
*Cree un [[Custom Reporting -- Creating Report Views| report view]] personalizado para el staff report. <br/>Las diferentes visualizaciones de un informe están pensadas para que usuarios no-administrativos vean los datos en el sistema.
*Cree un [[Custom Reporting -- Creating Report Views| report view]] personalizado para el staff report. <br/>Las diferentes visualizaciones de un informe están pensadas para que usuarios no-administrativos vean los datos en el sistema.


En realidad, esto es un proceso de cuatro pasos, siendo el primer paso decidir que datos desea y donde están guardados.  Supongamos que tenemos el siguiente formulario de requerimiento de un HR Manager:
En realidad, esto es un proceso de cuatro pasos, siendo el primer paso decidir que datos desea y donde están guardados.  Supongamos que tenemos el siguiente formulario de requerimiento de un Gerente de RH:
  Requerimiento: Cree una lista de personal con el puesto y localidad de cada persona  
  Requerimiento: Cree una lista de personal con el puesto y localidad de cada persona  


Line 28: Line 28:
==Paso 1: Cree el Formulario de Relació==
==Paso 1: Cree el Formulario de Relació==
Crearemos un formulario de relación llamado 'staff_info'.  El formulario del cual empezamos el desplasamiento de nuestro mapa se llama ''primary form.''  Estamos en libertad de escoger desde donde queremos iniciar el mapeo, pero seleccionae diferentes formularios primarios producira un grupo de datos diferentes. Hay tres relaciones principales que podemos crear que se basan en cual formulario principal escojamos.   
Crearemos un formulario de relación llamado 'staff_info'.  El formulario del cual empezamos el desplasamiento de nuestro mapa se llama ''primary form.''  Estamos en libertad de escoger desde donde queremos iniciar el mapeo, pero seleccionae diferentes formularios primarios producira un grupo de datos diferentes. Hay tres relaciones principales que podemos crear que se basan en cual formulario principal escojamos.   
*[[#Option A:  Person Report | Option A]]: Escoger el formulario ''person'' como el formulario principal. Luego los informes basados en la relación "staff_info" incluirán a todoas las personas en el sistema tengan o no un puesto.
*[[#Opción A:  Person Report | Option A]]: Escoger el formulario ''person'' como el formulario principal. Luego los informes basados en la relación "staff_info" incluirán a todoas las personas en el sistema tengan o no un puesto.
*[[#Option B:  Position Report | Option B]]: Escoger el formulario ''position'' como el formulario principal.  Luego los informes basados en la relación "staff_info" sólo incluirán a las personas en el sistema que tengan un puesto.  También, si hay algunos puestos vacantes, estos aparaeceran en el informe.
*[[#Option B:  Position Report | Option B]]: Escoger el formulario ''position'' como el formulario principal.  Luego los informes basados en la relación "staff_info" sólo incluirán a las personas en el sistema que tengan un puesto.  También, si hay algunos puestos vacantes, estos aparaeceran en el informe.
*[[#Option C: Current Position Report| Option C]]:  Escoger el formulario ''person_position'' fcomo el formulario principal.  Luego los informes basados en la relación "staff_info" sólo incluiran los puestos ocupados.
*[[#Option C: Current Position Report| Option C]]:  Escoger el formulario ''person_position'' fcomo el formulario principal.  Luego los informes basados en la relación "staff_info" sólo incluiran los puestos ocupados.
Line 35: Line 35:




===Option A: Person Report===
===Opción A: Person Report===
Select '''Configure System''' and then '''Form Relationships.''' We create a report relationship called 'staff_info' and choose "person" as the primary form, enter a display name and description. Then click update.
Select '''Configure System''' and then '''Form Relationships.''' We create a report relationship called 'staff_info' and choose "person" as the primary form, enter a display name and description. Then click update.
<center>
<center>

Revision as of 22:51, 30 September 2013

Éste artículo describe como crear un informe staff info personalizad para iHRIS Manage. Esto es un proceso de tres pasos:

  • Cree el form relationship 'staff_info'.
    Aquí elije los formularios que le interesan y como se relacionan el uno con el otro.
  • Cree un report 'staff_report' personalizado basado en la relación 'staff_info'
    Aquí escoge los campos que desee en su informe de las relaciones que ha creado. También puede escoger a través de que campos limitar todas las visualizaciones de informe creadas de este informe.
  • Cree un report view personalizado para el staff report.
    Las diferentes visualizaciones de un informe están pensadas para que usuarios no-administrativos vean los datos en el sistema.

En realidad, esto es un proceso de cuatro pasos, siendo el primer paso decidir que datos desea y donde están guardados. Supongamos que tenemos el siguiente formulario de requerimiento de un Gerente de RH:

Requerimiento: Cree una lista de personal con el puesto y localidad de cada persona 


El Formulario y Mapa de Campo

Un buen punto de inicio es ver el forms and fields y en especial la "visualización gráfica" que es un mapa de los formularios y campos en iHRIS Manage. Cuando construimos una buena relación de formulario, entonces adjuntamos formularios al cruzar las flechas en el formulario de mapa de campos, tanto hacia adelante como hacia atrás. Hay dos flechas en este mapa:

  • flechas negras: El nacimiento de una flecha, formA, se relaciona al objetivo de el formulario flecha, formB, a través de un campo mapeado. Si la flecha no está etiquetada, entonces el campo mapeado también es nombrado formB. De otra manera es la etiqueta de la flecha. Aunque, formA se mapea sólo a una instancia de formB, pueden haber muchas instancias de formA mepeadas desde formB. Así, cuando vaya hacia atrás en una flecha negra, probablemente tendrá que limitar el formulario adjunto para que se elija un único formulario.
  • flechas rojas: El nacimiento de una flecha, formA, es el originario del objetivo de la flecha, formB. Puede que formA tenga instancias de formB como un formulario secundario, pero formB sólo puede tener un formulario primario. Así, cuando vaya hacia adelante en una flecha roja, probablemente tendrá que limitar el formulario secundario para que se elija un único formulario secundario.

Paso 0: ¿Qué datos desea?

Este es el paso más importante, y requiere algunos conocimientos más amplios de cómo se utilizan los datos (formularios) en el sistema. Basándose en el requerimiento del HR Manager y el formulario y campo vemos que tenemos que incluir los formularios siguientes:

  • facility: necesitamos el nombre del local
  • job: necesitamos saber el puesto que desempeña la persona
  • person: aunque no está dicho de forma explícita como requerimiento, asumamos que el HR Manager también quiere saber el nombre de los miembros del personal

Sin embargo, si vemos el mapa de datos, podemos observar que no hay flechas que conecten directamente los formularios facility, job, y person. En lugar de eso vemos que necesitamos ir del formulario person, hacia el formulario person_position hacia el formulario position. Desde el formulario position, podemos adjuntar el facility y job. Esta es la parte relevante del formulario mapa de campo:

http://www.ihris.org/w/upload/Forms-person-position-map.gif

Nótese que sólo hay una flecha roja, conectando person y person_position, mientras que el resto de las flechas son negras.

Paso 1: Cree el Formulario de Relació

Crearemos un formulario de relación llamado 'staff_info'. El formulario del cual empezamos el desplasamiento de nuestro mapa se llama primary form. Estamos en libertad de escoger desde donde queremos iniciar el mapeo, pero seleccionae diferentes formularios primarios producira un grupo de datos diferentes. Hay tres relaciones principales que podemos crear que se basan en cual formulario principal escojamos.

  • Option A: Escoger el formulario person como el formulario principal. Luego los informes basados en la relación "staff_info" incluirán a todoas las personas en el sistema tengan o no un puesto.
  • Option B: Escoger el formulario position como el formulario principal. Luego los informes basados en la relación "staff_info" sólo incluirán a las personas en el sistema que tengan un puesto. También, si hay algunos puestos vacantes, estos aparaeceran en el informe.
  • Option C: Escoger el formulario person_position fcomo el formulario principal. Luego los informes basados en la relación "staff_info" sólo incluiran los puestos ocupados.

Cualquiera de las opciones tiene sentido y la elección depende de los requerimientos del Gerente de RH. Ya que el Gerenete de RH no os dió suficientes detalles para guiarnos, tendremos que pedirle que nos aclare este punto.


Opción A: Person Report

Select Configure System and then Form Relationships. We create a report relationship called 'staff_info' and choose "person" as the primary form, enter a display name and description. Then click update.

Now that we have created the 'staff_info' relationship we can edit it. Now we need to join the "person_position" form to the "position" form. To do this click Joined Forms then Add a New Form. Select person_position (child)" as the form to add, and the the "short name" to be 'person_position.' You should also set a display name and description for this form.

You will notice that we are traversing a red arrow forward, form person to person_position. By what we said above there may be many person_positions associated to a person, so we will need to limit the forms. We will need to limit the person_position form so that:

  • The start_date is maximal among all the values of the start_date field for any person_position that is a child of the current person . This way we get the most recent position the person has started.
  • The end_date is not null, so that we know that person still holds this position.

To do so, we click on Joined Forms once again and select Person Position (person_position), which is the form that we just added. Now we can choose to Limit This Form. Since we have two limits to place on this form, we will need to select the "Operator Node" to be "And."

Once we click the "Update" button, we can choose to Add A New Operand. We will do this twice, once for the 'start_date' and once for the 'end_date.' Once the operands have been added, we can Edit each of them and select to Limit By A Field:

Now click Update once again. We can now choose the two fields we want to limit by and how we want to limit them


Next, we join the person form to the person_position form as a parent form. We do this by click Joined Forms and then Add A New Child Form underneath the person_position form. Note, we do not need to specify any limits here as we are traversing a black arrow in the correct direction.

We finish by joining the "facility" and "job" forms to the "position" form by clicking Joined Forms and then Add A New Child Form underneath the position form. Note, we do not need to specify any limits here as we are traversing a black arrow in the correct direction.

Variations for Option A

  • Note: There is some potential ambiguity here. If a person was assigned to more than one position at a time with the same start_date, then there will be a person_position for each of the positions, so when the person_position form is joined it will choose one of person_position forms arbitrarily. If you expect that people can have more than one position, then you should choose option B
  • Note: We chose to limit the end_date to be not null so as to only get current positions. If we did not set a limit on the end_date, then we would get the last position the person held, regardless of whether they hold it or not.
  • Note: If we selected Drop row if no form found under the person_position form, then if a person did not have a person_position form associated to them, they would be removed from the report. Selecting to do so would make this a "Current Staff Report," rather than a "Person Report." We won't do this here, but you may choose to do so if this make sense for your requirements.

Option B: Position Report

Select Configure System and then Form Relationships. We create a report relationship called 'staff_info' and choose "position" as the primary form, enter a display name and description. Then click update.

Now that we have created the 'staff_info' relationship we can edit it.

First, we join the "facility" form to the "position" form by the mapped field "position." We also join the "job" form to the "position" form by the mapped field "job."

Next we need to join the "person_position" form as mapping to the position form via the position field. In the form field map, we are traversing a black arrow backwards, so we will need to add in some limits to choose a unique person_position form. There may be many person_positon forms mapping to a given position as multiple people could have held the same position. However, there should only be one person_position form where the end_date is null and this will correspond to the person currently holding this position.

Next, we join the person form as to the person_position form as its parent form. Since we are traversing a red arrow backwards, there is no ambiguity about which form we are joining.

Variations for Option B

  • If we chose to "Drop Row If No Form Found" when we joined in the person_position form, then we only will show those positions which have ever been assigned to someone so it becomes more of "Filled Positions" report, although not a Current Positions report.

Option C: Current Position Report

Select Configure System and then Form Relationships. We create a report relationship called 'staff_info' and choose "person_position" as the primary form, enter a display name and description. Then click update.

Now that we have created the 'staff_info' relationship we can edit it.

First, since we wish to only show the current positions, we will choose to limit the person_position form so that the end_date is not null.

Next, we join the person form which as the parent form of the person_position form. Since we are traversing a red arrow backwards, there is no ambiguity in which person we are joining.

Next we join the position form to person_position form via the mapped field position. Since we are traversing a black arrow forwards, there is no ambiguity in the position form we are joining.

Next we join the job and facility forms to the position form via their respective fields. Again, since we are traversing a black arrow forwards, there is no ambiguity in the forms we are joining.

Variations for Option C

  • If we chose not to use the limit end_date is null, we would end up with a report in which shows the history of any position which has been filled.

Step 2: Create the Report

Now that we have the relationship 'staff_info' built, we can create a report from that relationship. Go to Configure System and then Reports and choose to create a new report, called 'staff_report' based on the 'staff_info' relationship. When we are done you will see the zebra_staff_report table in the database. Here, we can choose the limits that we will want for the report views (below) as well as all the fields that we may want to see in a report view. To do so, click on the "Reporting Forms" and then the "Fields" and you will be able to enable or disable fields from the relationship to include in the report. You will also be able to change the header text for the field and set the limits for the field.

Step 3: Create the Report View

Go to Configure System and then Report Views and choose to create a new report view based on the report "staff_report." Just select the fields you want to display and you are done.