CRM-12623, improvements w.r.t custom table joins and notice fixes

----------------------------------------
* CRM-12623: Create CiviHR Report Template
  http://issues.civicrm.org/jira/browse/CRM-12623