All Collections
Plugins
Plugins - Timesheet Report (Queries)
Plugins - Timesheet Report (Queries)

Instructions on how to build the queries required for running a timesheet report

Sarah Mills avatar
Written by Sarah Mills
Updated over a week ago

This article is in relation to a specific Plugins utility tool called 'Timesheet Report'. For more information on this tool, please see:  http://help.peoplehr.com/plugins/plugins

In order to run this tool, you are required to build some queries that contain the data needed to pull this information. 

Query 1
Payroll : Core Data

1. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Company

  • Department

  • Reports to 

  • Salary Details  (First column)

  • Salary Type 

  • Employment Detail  (First column)

  • Time & Attendance ID 

  • Leavers (First column)

  • Final Day of Employment

If you include include 'Timesheet comments' in your query, these comments will pull through to the 'Detailed timesheet report'.

2. Click 'Next' and go into the filters area.

3. For this query, you can skip this area and go select 'Next' again. 

4. Name this query - Payroll : Core Data

5. Click 'Next'

6. Select the 'Options' button:

7. Include Leavers: 

8. Click Save - You can now close this query. 

Query 2
Payroll : Time Data

1. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Break Timesheets  (First column)

  • Timesheet date,

  • Time In 1

  • Time Out 1

  • Time In 2

  • Time Out 2

  • Time In 3

  • Time Out 3

  • [Keep selecting until all available Time Ins and Outs are selected]

  • Total time worked per day 

2. Click 'Next' and go into the filters area.

3. For this query, you can skip this area and go select 'Next' again. 

4. Name this query - Payroll : Time Data

5. Click 'Next'

6. Select the 'Options' button and 'Include Leavers' (as shown in the first query)

7. Click Save - You can now close this query. 

Query 3
Payroll : Holidays 

1. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Holidays (First Column)

  • Holiday Start Date

  • Holiday End Date

  • Holiday Type

  • Holiday Duration Type

  • Part of the Day

  • Duration (Days)

  • Duration (Hours)

  • Holiday Status

2. Click 'Next' and go into the filters area.

3.  Here you need to filter to only show approved holidays. Please follow the below image on what to filter:

4. Click 'Next'.

5. Name this query - Payroll : Holidays


6. Click 'Next'

7.  Select the 'Options' button and 'Include Leavers' (as shown in the first query)

8. Click Save - You can now close this query. 

Query 4:
Payroll : Other Events 

1. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Other Events (First column)

  • Other Events Duration Type 

  • Other Events Reason

  • Other Events Start Date

  • Other Events End Date

  • Other Events Total Duration (Days)

  • Other Events Total Duration (Hrs)

  • Other Events Status 

  • Deleted Other Event record (Yes/No)

2. Click 'Next' and go into the filters area.

3.  Here you need to filter to only show approved and non-deleted events. Please follow the below images on what to filter:

4. Click 'Next'.

5. Name this query - Payroll : Other Events:

7.  Select the 'Options' button and 'Include Leavers' (as shown in the first query)

8. Click Save - You can now close this query. 

Query 5
Payroll : Work Pattern 

1. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Company

  • Department 

  • Salary (First column)

  • Salary type

  • Work Pattern (First column)

  • Work Pattern Effective Date

  • Working Hours 

2. Click 'Next' and go into the filters area.

3. For this query, you can skip this area and go select 'Next' again. 

4. Name this query - Payroll : Work Pattern

5. Click 'Next'

6. Select the 'Options' button:

7. Select 'Include Leavers' and 'Show History': 

7. Click Save - You can now close this query. 

Query 6
Payroll : Sick 

1. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Absences (First column)

  • Sick Start Date 

  • Sick End Date

  • Sick Duration Type Sick (AM/PM)

  • Sick Duration (Days)

  • Sick Duration (Hrs)

  • Sick Reason 

2. Click 'Next' and go into the filters area.

3. For this query, you can skip this area and go select 'Next' again. 

4. Name this query - Payroll : Sick

5. Click 'Next'

6. Select the 'Options' button and 'Include Leavers' (as shown in the first query)

7. Click Save - You can now close this query. 

Query 7
Payroll : MatPat 

1. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Maternity/Paternity (First column)

  • Mat/Pat Actual Start Date 

  • Mat/Pat Actual End Date 

2. Click 'Next' and go into the filters area.

3. For this query, you can skip this area and go select 'Next' again. 

4. Name this query - Payroll : MatPat

5. Click 'Next'

6. You can now close this query. 

---

The above queries are mandatory in order for this tool to process. There are three other optional queries that you can build if you would like to store and extract this information from the system. These are:

  • Banked Hours

  • Lunch Breaks

  • Overtime

This information would come from a custom logbook, where employees would have this information stored within their specified logbook screens. The below information describes how these logbooks should be built, and how to build the query to extract this information. To learn more about custom logbooks as a whole, please see:

Logbook&Query 1
Payroll : Banked Hours 

1. You would be required to create a logbook called 'Banked Hours' that contains the following fields:

  • Date

  • Rate Code (21,22,etc)

  • Hours (Must be HH:MM eg 03:03)

Once this is built and there is valid information stored within this logbook, you can build the query. 

2. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Employment details (First column)

  • Time & Attendance ID

  • Banked hours (First column)

  • Date(Banked Hours) 

  • Rate Code(Banked Hours) 

  • Hours(Must be HH:MM eg 03:03) (Banked Hours) 

3. Click 'Next' and go into the filters area.

4. For this query, you can skip this area and go select 'Next' again. 

6. Name this query - Payroll : Banked Hours

5. Click 'Next'

6. Select the 'Options' button and 'Include Leavers' (as shown in the first query)

7. Click Save - You can now close this query. 

Logbook&Query 2
Payroll : Lunch Breaks

You would be required to create a logbook called 'Lunch Breaks' that contains the following fields:

  • Date

  • Reason

Once this is built and there is valid information stored within this logbook, you can build the query. 

2. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Lunch Breaks (First column)

  • Date(Lunch Breaks) 

  • Reason(Lunch Breaks) 

3. Click 'Next' and go into the filters area.

4. For this query, you can skip this area and go select 'Next' again. 

6. Name this query - Payroll : Lunch Breaks

5. Click 'Next'

6. Select the 'Options' button and 'Include Leavers' (as shown in the first query)

7. Click Save - You can now close this query. 

Logbook&Query 3
Payroll :  Overtime

1. You would be required to create a logbook called 'Overtime' that contains the following fields:

  • Date Overtime Worked

  • Reason

  • Overtime Hours Worked

Once this is built and there is valid information stored within this logbook, you can build the query. 

2. Selected areas - in the first page of the query builder, please select the following options: 

  • Employee details (First column)

  • Employee ID

  • First Name 

  • Last Name

  • Overtime

  • Date Overtime Worked (Overtime)

  • Reason (Overtime)

  • Overtime Hours Worked (Overtime) 

3. Click 'Next' and go into the filters area.

4. For this query, you can skip this area and go select 'Next' again. 

6. Name this query - Payroll : Overtime

5. Click 'Next'

6. Select the 'Options' button and 'Include Leavers' (as shown in the first query)

7. Click Save - You can now close this query. 

---

Once all is complete, please revert back to the below article on the Timesheet Reporting tool:

Thanks,

Customer Services Team.

Did this answer your question?