Point-In-Time (PIT) Reporting SQL View for June 2016
This is a publication of Delphia Consulting, LLC. Delphia Consulting, LLC has made every effort to ensure this documentation is correct and accurate but reserves the right to make changes without notice at its sole discretion. Use, duplication, modification or transfer of the product described in this publication, except as expressly permitted by the Delphia Consulting, LLC License Agreement is strictly prohibited. Individuals who make any unauthorized use of this product may be subject to civil and criminal penalties. Copyright 2016 Delphia Consulting, LLC, Inc. All rights reserved. Unauthorized duplication prohibited. is a trademark of Delphia Consulting, LLC. Sage, the Sage logos, and the Sage product and service names mentioned herein are registered trademarks or trademarks of Sage Software, Inc. or its affiliated entities. All other trademarks are the property of their respective owners. Your use of this document and the product described herein is governed by the terms and conditions of the End User License Agreement ("EULA") or other agreement that is provided with or included in the product. Nothing in this document supplements, modifies or amends those terms and conditions. Except as expressly stated in those terms and conditions, the information in this document is provided by Delphia Consulting "AS IS" and Delphia Consulting disclaims all express, implied or statutory warranties of any kind, including but not limited to the warranties of merchantability, fitness for a particular purpose or of non-infringement. No implied license is granted to you under any Delphia Consulting intellectual property or trade secret right. Delphia Consulting reserves the right to revise, supplement, or remove information in this document at any time without notice to you or others.
Table of Contents Overview... 4 Support... 4 Supported Versions of and Abra Suite... 4 Purpose... 5 Files provided... 5 Installation... 6 SQL Database... 6 Changing the Crystal Reports Database Connection... 7 Report Outputs... 13 DC_UPDATEJOBHISTORY.rpt... 13 DC_JOBHISTORYREPORT.rpt... 14 DC_JOBHISEXCEPTIONS.rpt... 15 Job History Processing... 16 Page 3 of 16
Overview This document includes instructions for setup and implementation of Sage HRMS. Make sure you have the following items before you begin a new installation or an upgrade: o Microsoft.NET Framework version 4.5 or later installed on target machine o (this document) o Crystal Reports version 11 or greater The installation of HR Actions is not covered by this document. Please refer to the HR Actions Installation Guide and/or engage with your certified HR Actions installation consultant or a member of the HR Actions Professional Services Team (614-754-4343). SUPPORT Technical support for is available via email support@hractions.com or call support Monday through Friday, 8am-6pm Eastern Time at 614-754-4343. support provided as part of Sage Business Care is not an appropriate substitute for a properly planned and executed implementation project led by a certified Point-In-Time (PIT) Reporting SQL View for implementation consultant. SUPPORTED VERSIONS OF SAGE HRMS AND ABRA SUITE Version 2.0.0 of works with the following: 2014 2015 2016 Within this document, when we refer to we are referring to any of the above. Page 4 of 16
Purpose This document describes the installation and setup of the and the associated Crystal Reports. Included is a SQL database script that creates a series of SQL stored procedures, tables and views that are queried by a set of Crystal Reports. One of the basic Crystal reports provided by these tools refreshes the Job History tables by running a stored procedure that updates the Job History From and To Effective dates within the PIT Job History tables. This allows the user great flexibility in developing additional custom Crystal reports that can be used to provide data analysis of historical Employee Data contained within the tables and views that are maintained by these procedures. FILES PROVIDED The following files are provided in the startup kit for these tools: DC_JOBHISTORYSETUP.sql Installs the Setup Procedures, Tables, and Views used by Crystal Reports. DC_JOBHISTORYREPORT.rpt Crystal Report for Valid Current, and History Employee Data DC_JOBHISEXCEPTIONS.rpt Crystal Report for Invalid Employee Job History Data DC_UPDATEJOBHISTORY.rpt Crystal Report used to update the Job History tables DC_JOBHISTORYBYPARAMS.rpt Crystal Report using Company, Empno, Status, and Date Parameters DC_EXCEPTIONSBYPARAMS.rpt Crystal Exceptions Report using Company, Empno, and Status Params Page 5 of 16
Installation SAGE HRMS SQL DATABASE Run the DC_JOBHISTORYSETUP script in the SQL database in order to take advantage of direct access to the SQL tables. The installation procedure will automatically detect the existence of the HRMS tables, so a null or empty string is all that is required when running the DC_SETUPJOBHISTORY_SP procedure. Note: These procedures assume installation on a SQL database (e.g., SageHRMS_Live). If your database is named differently, use that name throughout the install process. 1. Store the files in a directory that is accessible to the SQL Server and to Crystal. 2. Open and run the DC_JOBHISTORYSETUP.sql script in the SQL Query Analyzer on the SageHRMS_Live database in order to install the DC_JOBHISTORY procedures, tables & views. 3. Close the script, open a fresh Query Window, and execute the following command on the SageHRMS_Live database in order to populate the job history tables and complete the installation process: exec DC_SETUPJOBHISTORY_SP 'SageHRMS_Live' Page 6 of 16
4. Open and edit the Database Location for each of the Crystal Reports as outlined in the next section in order to change the database location to the DC_UPDATEJOBHISTORY_SP procedure in the SageHRMS_Live database. Changing the Crystal Reports Database Connection Note: The five Crystal Reports supplied with this utility were created with Crystal 11 and must be edited in order to change the database connections to your local database. Follow these steps when changing the connection: 1. Open the DC_UPDATEJOBHISTORY.rpt report which is used to trigger the update to the Job History records. 2. Click on the Database Icon on the toolbar and then expand the Create New Connection option to add a new connection. Select OLE DB (ADO) as the data source. Page 7 of 16
3. You will be presented with a pop-up window where you can select the data source provider. Select Microsoft OLE DB Provider for SQL Server then click Next. 4. Select or enter the server that hosts your live database. Enter the credentials required to log on to the server. Select the live database as the Database. Click Finish when you are satisfied with the values. Note: Check the Integrated Security checkbox if you would like to use Windows Authentication. Page 8 of 16
5. Select the Database file menu item in the toolbar at the top of the application, then select the Set Datasource Location option. Page 9 of 16
6. You will be presented with a popup that contains 2 separate windows: the currently selected data source window and the Replace with: window. Page 10 of 16
7. Select (highlight, don t expand) the DC_UPDATEJOBHISTORY_SP; 1 stored procedure from the top window. Then, drill into the database of your new data source in the Replace with: window. Expand the database name node, the schema node (dbo), and the stored procedures node. 8. Select the DC_UPDATEJOBHISTORY_SP; 1 procedure and click the Update button on the right. Page 11 of 16
9. You will notice that your newly created data source is now present in the Current Data Source window. Close the window. 10. Press F5 to refresh the report data. Note that this process may take a few moments while the Update Job History report data appears, and the Job History tables are being refreshed. Click Save to save your changes to the report. 11. Repeat steps 5-11 for each of the reports. However, be sure to select the correct source procedure or view for each report as in the following listing, otherwise you will risk losing all of your report fields. Note: To select a view as the source, expand the Views node under the dbo schema instead of the Stored Procedures node. a. DC_UPDATEJOBHISTORY.rpt = Procedure: DC_UPDATEJOBHISTORY_SP b. DC_JOBHISTORYREPORT.rpt = View: DC_JOBHISTORY_VW c. DC_JOBHISEXCEPTIONS.rpt = View: DC_EXCEPTIONS_VW d. DC_JOBHISTORYBYPARAMS.rpt = Procedure: DC_GETJOBHISTORYBYPARAMS_SP e. DC_EXCEPTIONSBYPARAMS.rpt = Procedure: DC_GETEXCEPTIONSBYPARAMS_SP\ Note: When changing the current data source in the Set Datasource Location popup, you may be prompted to re-map fields. In the Unmapped Fields section at the top of the window, select the unmapped field(s) in the left window then select its companion field in the right window and click the Map and OK buttons. Page 12 of 16
Report Outputs DC_UPDATEJOBHISTORY.RPT Press F5 in order to Refresh the report and launch the update procedure. The process will take approximately 3 minutes for about 100k employee records. Once completed, the report will display a report similar to the following: 1. This report displays the number of tasks performed by the procedure, the start and stop times for each task, the elapsed time for each task, and the number of records processed in the Job History tables. No changes are made to any database tables during this process. 2. Running this report automatically updates all the tables and views used by this utility and may be run on-demand whenever fresh data is desired. 3. An alternative to running this update procedure on a nightly basis is to enter the following command in the SQL Job Scheduler: exec DC_UPDATEJOBHISTORY_SP Page 13 of 16
DC_JOBHISTORYREPORT.RPT Displays the valid past and present history records for all employees after refreshing the Job History tables. Page 14 of 16
DC_JOBHISEXCEPTIONS.RPT Displays any records that were excluded from the Job History report. Reasons for the exception records are displayed by each employee name along with the effective dates (if any). 4. Modify the database location for the DC_JOBHISTORYBYPARAMS.rpt report to use the DC_GETJOBHISTORY_SP procedure. This procedure provides 4 parameters or user prompts for the Company, Empno, Status (A/L/T), and/or Date. Any combination or absence of these parameters will return different sets of data when the report is refreshed. The report format is the same as the DC_JOBHISTORYREPORT.rpt in the previous example. 5. Modify the database location for the DC_EXCEPTIONSBYPARAMS.rpt report to use the DC_GETEXCETPIONS_SP procedure. This procedure provides 3 parameters or user prompts for the Company, Empno, and/or Status (A/L/T). Any combination or absence of these parameters will return different sets of data when the report is refreshed. The report format is the same as the DC_JOBHISEXCEPTIONS.rpt in the previous example. Page 15 of 16
JOB HISTORY PROCESSING When processing current employee records from HRPERSNL and Job History records from HJOBHIS, only employee records with a P_ACTIVE status of A (Active), L (LOA), or T (Terminated) are processed. Non-Employee ( N ) and COBRA Dependent ( D ) are not included in the Job History tables. The procedure uses the P_EFFDATE from HRPERSNL or the J_EFFDATE from HJOBHIS for all Active / LOA employee records for the Effective From Date. When the employee is terminated, then the P_TERMDATE from HRPERSNL or the J_TERMDATE from HJOBHIS is used for the Effective From Date. The only records that are excluded from the Job History tables are those from HJOBHIS where the Effective From Date (J_EFFDATE for Active/LOA Job History records or J_TERMDATE for Terminated Job History record) is either empty (NULL) or greater than / equal to the parent employee record in the HRPERSNL table. In addition, duplicate records with the same Effective From Date are excluded and only the latest change record number is retained in the Job History tables. Page 16 of 16