SET @pim_sample_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'PIM Sample Report');
SET @employee_contact_detail_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'Employee Contact Details');
SET @employee_job_detail_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'Employee Job Details');
SET @employee_over_five_years_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'Employees with Over 5 Years of Service');
SET @employee_birthday_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'Employee Birthdays');
SET @employee_salary_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'Employee Salary Report');
SET @eeo_job_category_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'EEO - Job Categories');
SET @employee_retirement_forecast_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'Employee Retirement Forecast');
SET @employee_emergency_contacts__dependents_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'Employee emergency contacts & dependents');
SET @terminated_employee_list_report := (SELECT id FROM ohrm_advanced_report WHERE name = 'Terminated Employee List');

INSERT INTO ohrm_report_configuration (report_id, configuration) VALUES 
(@pim_sample_report, '{"selectedDisplayFieldGroups":["1","2","6","3","4","15","10","11","12","13","14","9","8","7","5"],"selectedDisplayFields":["9","10","11","12","13","14","15","17","18","19","97","20","21","22","23","24","25","75","76","77","78","80","81","82","83","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","47","48","49","52","53","54","55","57","58","92","59","60","61","93","94","65","70","84","85","86","87","88","89","90","95","122","200_1","201_1"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false}}'),
(@employee_contact_detail_report, '{"selectedDisplayFieldGroups":["1","2","6"],"selectedDisplayFields":["9","10","11","12","20","20_1","20_2","20_3","20_4","20_5","20_6","21","22","24","77","82","83"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false}}'),
(@employee_job_detail_report, '{"selectedDisplayFieldGroups":["1","6"],"selectedDisplayFields":["9","10","11","12","75","76","77","78","80","81","82","83","jb_01","113","114","120","154","155","156","157"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false}}'),
(@employee_over_five_years_report, '{"selectedDisplayFieldGroups":["1","6"],"selectedDisplayFields":["9","10","11","12","75","76","77","78","80","81","82","83","jb_01","113","114","120","154","155","156","157"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false,"service_period":{"comparison":">","from":5,"to":""}}}'),
(@employee_birthday_report, '{"selectedDisplayFieldGroups":["1"],"selectedDisplayFields":["9","10","11","12","13","15","17"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false}}'),
(@employee_salary_report, '{"selectedDisplayFieldGroups":["1","6","9","8","7"],"selectedDisplayFields":["9","10","11","12","77","78","81","82","83","65","70","158","159","comp1","200_1","201_1"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false}}'),
(@eeo_job_category_report, '{"selectedDisplayFieldGroups":["1","6"],"selectedDisplayFields":["9","10","11","12","75","76","77","78","80","81","82","83"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false}}'),
(@employee_retirement_forecast_report, '{"selectedDisplayFieldGroups":["1","6"],"selectedDisplayFields":["9","10","11","12","13","15","75","76","77","78","80","81","82","83","154","155"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false,"age_group":{"comparison":">","from":54,"to":""}}}'),
(@employee_emergency_contacts__dependents_report, '{"selectedDisplayFieldGroups":["1","2","6","3","4"],"selectedDisplayFields":["9","10","11","12","13","15","17","20","20_1","20_2","20_3","20_4","20_5","20_6","21","22","25","77","78","82","83","26","27","28","29","30","31","32","33","34"],"selectedFilterCriteria":{"include":"1","show_only_filtered_records":false}}'),
(@terminated_employee_list_report, '{"selectedDisplayFieldGroups":["1","6"],"selectedDisplayFields":["9","10","11","12","75","76","77","78","80","81","82","83","jb_01","113","114","120","154","155","156","157"],"selectedFilterCriteria":{"include":"3","show_only_filtered_records":false}}');

INSERT INTO ohrm_report_share (report_id, role_type_id) VALUES
(@pim_sample_report, 1),
(@employee_contact_detail_report, 1),
(@employee_job_detail_report, 1),
(@employee_over_five_years_report, 1),
(@employee_birthday_report, 1),
(@employee_salary_report, 1),
(@eeo_job_category_report, 1),
(@employee_retirement_forecast_report, 1),
(@employee_emergency_contacts__dependents_report, 1),
(@terminated_employee_list_report, 1);
