Filtering employee timesheet reports to specific roles or groups

Discussion in 'General Business' started by pacifictimesheet, Jul 12, 2011.

  1. #1
    Employee timesheet reports (e.g. Employee Hours, etc.) do not have a built-in filter for limiting the employee records returned to specific roles (permission levels) or reporting groups. But you can do this easily by creating a custom filter using SQL. To limit employee records to a particular named role you can use something like the following SQL custom filter:
    t_user.roleid IN (select id from t_role where name='Employee')
    To limit employee records to a particular named reporting group you would use something like the following SQL custom filter:
    t_user.groupid IN (select id from t_group where name in ('Group 001','Group 002'))
    To exclude a role or group you would use NOT IN instead of IN in the above expressions. You don't have to be a SQL guru to use custom filters, but it helps to know the basics. An excellent source for information can found at W3 Schools (http://www.w3schools.com/sql).

    Jason Trend
    Pacific Timesheet
    http://www.pacifictimesheet.com
     
    pacifictimesheet, Jul 12, 2011 IP