protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_DependentReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_DependentReport.ServerReport; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Department; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "DependentsInformation"; if (Convert.ToString(Request.QueryString["DEPT"]) != "") { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEPT"])); } else { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { DateTime dt = new DateTime(); dt = Convert.ToDateTime(DateTime.Now.Date); Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(dt)); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Period, BusinessGroup, Department }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_DependentReport.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "DependentsInformationReports", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_FORM1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_FORM1.ServerReport; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); serverReport.ReportPath = MyReportPath + "FORM1"; serverReport.Refresh(); RPT_FORM1.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "FORM1", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_UserLog.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_UserLog.ServerReport; Microsoft.Reporting.WebForms.ReportParameter ORGANISATION; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); ORGANISATION = new Microsoft.Reporting.WebForms.ReportParameter("ORGANISATION", Convert.ToString(Session["EMP_ORGANISATION_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { ORGANISATION }; serverReport.SetParameters(parameters); serverReport.Refresh(); } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "UserLog", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_EmployeeSkill.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_EmployeeSkill.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BUSINESSUNIT; Microsoft.Reporting.WebForms.ReportParameter EMPLOYEE; Microsoft.Reporting.WebForms.ReportParameter SKILLS; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "Employee_Skills_Report"; if (Convert.ToString(Request.QueryString["BU"]) != "") { BUSINESSUNIT = new Microsoft.Reporting.WebForms.ReportParameter("BUSINESSUNIT", Convert.ToString(Request.QueryString["BU"])); } else { BUSINESSUNIT = new Microsoft.Reporting.WebForms.ReportParameter("BUSINESSUNIT", "-1"); } if (Convert.ToString(Request.QueryString["EMP"]) != "") { EMPLOYEE = new Microsoft.Reporting.WebForms.ReportParameter("EMPLOYEE", Convert.ToString(Request.QueryString["EMP"])); } else { EMPLOYEE = new Microsoft.Reporting.WebForms.ReportParameter("EMPLOYEE", "-1"); } if (Convert.ToString(Request.QueryString["SKL"]) != "") { SKILLS = new Microsoft.Reporting.WebForms.ReportParameter("SKILLS", Convert.ToString(Request.QueryString["SKL"])); } else { SKILLS = new Microsoft.Reporting.WebForms.ReportParameter("SKILLS", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("ORGANISATION", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BUSINESSUNIT, EMPLOYEE, SKILLS }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_EmployeeSkill.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "EmployeeSkillReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_EmpIncome.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_EmpIncome.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Period; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); serverReport.ReportPath = MyReportPath + "EmployeeIncomeDetails"; //if (Convert.ToString(Request.QueryString["ORG"]) != "") //{ // Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG"])); //} //else //{ // Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); //} if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessGroup }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_EmpIncome.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "EmpIncomeDetailsReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_EmployeeExp.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_EmployeeExp.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter From; Microsoft.Reporting.WebForms.ReportParameter To; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "EmployeeYearOfExperience"; if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["FROM"]) != "") { From = new Microsoft.Reporting.WebForms.ReportParameter("From", Convert.ToString(Request.QueryString["FROM"])); } else { From = new Microsoft.Reporting.WebForms.ReportParameter("From", "-1"); } if (Convert.ToString(Request.QueryString["TO"]) != "") { To = new Microsoft.Reporting.WebForms.ReportParameter("To", Convert.ToString(Request.QueryString["TO"])); } else { To = new Microsoft.Reporting.WebForms.ReportParameter("To", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessGroup, From, To }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_EmployeeExp.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "EmployeeYearOfExperienceReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_JobOfferReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_JobOfferReport.ServerReport; RPT_JobOfferReport.AsyncRendering = false; if (!RPT_JobOfferReport.Enabled) { RPT_JobOfferReport.CurrentPage = 1; } string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "JobOffer"; Microsoft.Reporting.WebForms.ReportParameter ApplicantId; Microsoft.Reporting.WebForms.ReportParameter JobId; if (Convert.ToString(Request.QueryString["ApplicantId"]) != "") { ApplicantId = new Microsoft.Reporting.WebForms.ReportParameter("ApplicantId", Session["JOBOFFRS_APPLICANT_ID"].ToString()); // Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"])); } else { ApplicantId = new Microsoft.Reporting.WebForms.ReportParameter("ApplicantId", "-1"); } if (Convert.ToString(Request.QueryString["JobId"]) != "") { JobId = new Microsoft.Reporting.WebForms.ReportParameter("JobId", Session["JOBOFFRS_REQCODE"].ToString()); // Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"])); } else { JobId = new Microsoft.Reporting.WebForms.ReportParameter("JobId", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { ApplicantId, JobId }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_JobOfferReport.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "JobOfferReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_SalaryStructureReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_SalaryStructureReport.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter SalaryStructure; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "SalaryStructureReport"; if (Convert.ToString(Request.QueryString["ORG_ID"]) != "") { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["SAL"]) != "") { SalaryStructure = new Microsoft.Reporting.WebForms.ReportParameter("SalaryStructure", Convert.ToString(Request.QueryString["SAL"])); } else { SalaryStructure = new Microsoft.Reporting.WebForms.ReportParameter("SalaryStructure", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, SalaryStructure }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_SalaryStructureReport.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_EmpSalWiseDataReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Submit_Click(object sender, EventArgs e) { try { RPT_WhtReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_WhtReport.ServerReport; RPT_WhtReport.AsyncRendering = false; if (!RPT_WhtReport.Enabled) { RPT_WhtReport.CurrentPage = 1; } string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); serverReport.ReportPath = "/SmartHR/" + "WHTreport"; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Department; if (ddl_Department.SelectedIndex != 0) { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", ddl_Department.SelectedValue); } else { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1"); } if (ddl_BusinessUnit.SelectedIndex != 0) { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", ddl_BusinessUnit.SelectedValue); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (rcmb_payElements.SelectedIndex != 0) { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(rcmb_payElements.SelectedValue)); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Period, BusinessGroup, Department }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_WhtReport.Visible = true; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Wht", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void LoadReport() { try { rwDivWiseEmp.VisibleOnPageLoad = true; RPT_DivisionalwiseEmployeereport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_DivisionalwiseEmployeereport.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Businessunit; Microsoft.Reporting.WebForms.ReportParameter Department; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "DivisionalwiseEmploye"; if (Convert.ToString(Request.QueryString["ORG_ID"]) != "") { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", Convert.ToString(rcmb_BusinessUnit.SelectedValue)); } else { Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", "-1"); } if (Convert.ToString(Request.QueryString["Dept"]) != "") { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(rcmb_Department.SelectedValue)); } else { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Businessunit, Department }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_DivisionalwiseEmployeereport.Visible = true; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "DivisionalwiseEmployee", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_ResourcesStatus.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_ResourcesStatus.ServerReport; Microsoft.Reporting.WebForms.ReportParameter ORG; Microsoft.Reporting.WebForms.ReportParameter BU; Microsoft.Reporting.WebForms.ReportParameter RMANAGER; //Microsoft.Reporting.WebForms.ReportParameter EMP_LOGIN_ID; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "Resources Status"; if (Convert.ToString(Request.QueryString["BU"]) != "") { BU = new Microsoft.Reporting.WebForms.ReportParameter("BU", Convert.ToString(Request.QueryString["BU"])); } else { BU = new Microsoft.Reporting.WebForms.ReportParameter("BU", "-1"); } if (Convert.ToString(Request.QueryString["Rep_Emp"]) != "") { RMANAGER = new Microsoft.Reporting.WebForms.ReportParameter("RMANAGER", Convert.ToString(Request.QueryString["Rep_Emp"])); } else { RMANAGER = new Microsoft.Reporting.WebForms.ReportParameter("RMANAGER", "-1"); } //EMP_LOGIN_ID = new Microsoft.Reporting.WebForms.ReportParameter("EMP_LOGIN_ID", Convert.ToString(Session["USER_ID"])); ORG = new Microsoft.Reporting.WebForms.ReportParameter("ORG", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { ORG, BU, RMANAGER }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_ResourcesStatus.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "ResourcesStatusReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_MedicalServiceProvider.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_MedicalServiceProvider.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter FromDate; Microsoft.Reporting.WebForms.ReportParameter ToDate; Microsoft.Reporting.WebForms.ReportParameter ServiceProvider; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + Convert.ToString(Request.QueryString["RPT"]); if (Convert.ToString(Request.QueryString["FD"]) != "") { FromDate = new Microsoft.Reporting.WebForms.ReportParameter("FromDate", Convert.ToString(Request.QueryString["FD"])); } else { FromDate = new Microsoft.Reporting.WebForms.ReportParameter("FromDate", "01-01-1900"); } if (Convert.ToString(Request.QueryString["TD"]) != "") { ToDate = new Microsoft.Reporting.WebForms.ReportParameter("ToDate", Convert.ToString(Request.QueryString["TD"])); } else { ToDate = new Microsoft.Reporting.WebForms.ReportParameter("ToDate", "01-01-1900"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); ServiceProvider = new Microsoft.Reporting.WebForms.ReportParameter("ServiceProvider", Convert.ToString(Request.QueryString["SP"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, FromDate, ToDate, ServiceProvider }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_MedicalServiceProvider.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "MedicalServiceProviderReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_terminateEmployee.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_terminateEmployee.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter Grievance; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; if (Convert.ToString(Request.QueryString["empid"]) != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["empid"])); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1"); } Grievance = new Microsoft.Reporting.WebForms.ReportParameter("Grievance", Convert.ToString(Request.QueryString["grevid"])); //OG=' + org + '&BU=' + buid + '&DER=' + derict+'&DEP='+depart+'&FMDATE='+frmdate+'&TDAT='+Tdate, "RadWindow1"); if (Convert.ToString(Request.QueryString["type"]).ToUpper() == "TERMINATE") { serverReport.ReportPath = MyReportPath + "Termination"; Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Employee }; serverReport.SetParameters(parameters); } else { serverReport.ReportPath = MyReportPath + "Suspension"; Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Employee, Grievance }; serverReport.SetParameters(parameters); } serverReport.Refresh(); RPT_terminateEmployee.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_lettermail", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_EmpTypeWiseLoanBalance.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_EmpTypeWiseLoanBalance.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Employeetype; string sDomain = System.Configuration.ConfigurationManager.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationManager.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "Employee Type Wise Loan Balance"; if (Convert.ToString(Request.QueryString["EMPT"]) != "") { Employeetype = new Microsoft.Reporting.WebForms.ReportParameter("Employeetype", Convert.ToString(Request.QueryString["EMPT"])); } else { Employeetype = new Microsoft.Reporting.WebForms.ReportParameter("Employeetype", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Employeetype }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_EmpTypeWiseLoanBalance.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "EmpTypeWiseLoanBalanceReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_EmployeePensionComputationsReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_EmployeePensionComputationsReport.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter Organisation; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "Pension and Life Benefits Report"; if (Convert.ToString(Request.QueryString["EMP_ID"]) != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["EMP_ID"])); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Employee }; serverReport.SetParameters(parameters); serverReport.Refresh(); } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frmEmployeePensionComputationsReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_LoanVoucher.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_LoanVoucher.ServerReport; Microsoft.Reporting.WebForms.ReportParameter RequestId; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "Loan Voucher"; if (Convert.ToString(Request.QueryString["LRID"]) != "") { RequestId = new Microsoft.Reporting.WebForms.ReportParameter("RequestId", Convert.ToString(Request.QueryString["LRID"])); } else { RequestId = new Microsoft.Reporting.WebForms.ReportParameter("RequestId", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { RequestId }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_LoanVoucher.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "LoanVoucherReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { //code for security privilage Session.Remove("WRITEFACILITY"); SMHR_LOGININFO _obj_Smhr_LoginInfo = new SMHR_LOGININFO(); _obj_Smhr_LoginInfo.OPERATION = operation.Empty1; _obj_Smhr_LoginInfo.LOGIN_USERNAME = Convert.ToString(Session["USERNAME"]).Trim(); _obj_Smhr_LoginInfo.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_Smhr_LoginInfo.LOGIN_PASS_CODE = Convert.ToString("Form2 Add Family Declaration"); DataTable dtformdtls = BLL.get_LoginInfo(_obj_Smhr_LoginInfo); if (dtformdtls.Rows.Count != 0) { if ((Convert.ToBoolean(dtformdtls.Rows[0]["TYPSEC_READ"]) == true) && (Convert.ToBoolean(dtformdtls.Rows[0]["TYPSEC_WRITE"]) == true)) { Session["WRITEFACILITY"] = 1;//WHICH MEANS READ AND WRITE } else if ((Convert.ToBoolean(dtformdtls.Rows[0]["TYPSEC_READ"]) == true) && (Convert.ToBoolean(dtformdtls.Rows[0]["TYPSEC_WRITE"]) == false)) { Session["WRITEFACILITY"] = 2;//WHICH MEANS READ NO WRITE } else if ((Convert.ToBoolean(dtformdtls.Rows[0]["TYPSEC_READ"]) == false) && (Convert.ToBoolean(dtformdtls.Rows[0]["TYPSEC_WRITE"]) == false)) { Session["WRITEFACILITY"] = 3;//WHICH MEANS NO READ AND NO WRITE } } else { smhr_UNAUTHORIZED _obj_smhr_unauthorized = new smhr_UNAUTHORIZED(); _obj_smhr_unauthorized.UNAUTHORIZED_USERID = Convert.ToInt32(Session["USER_ID"]); _obj_smhr_unauthorized.UNAUTHORIZED_FORMID = Convert.ToInt32(ViewState["FORMS_ID"]); _obj_smhr_unauthorized.UNAUTHORIZED_MODULEID = Convert.ToInt32(ViewState["MODULE_ID"]); _obj_smhr_unauthorized.UNAUTHORIZED_ACCESSDATE = Convert.ToDateTime(DateTime.Now.ToString()); SMHR.BLL.UnAuthorized_Log(_obj_smhr_unauthorized); Response.Redirect("~/frm_UnAuthorized.aspx", false); } if (Convert.ToInt32(Session["WRITEFACILITY"]) == 2) { //Rg_Countries.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; //btn_Save.Visible = false; //btn_Update.Visible = false; } else if (Convert.ToInt32(Session["WRITEFACILITY"]) == 3) { smhr_UNAUTHORIZED _obj_smhr_unauthorized = new smhr_UNAUTHORIZED(); _obj_smhr_unauthorized.UNAUTHORIZED_USERID = Convert.ToInt32(Session["USER_ID"]); _obj_smhr_unauthorized.UNAUTHORIZED_FORMID = Convert.ToInt32(ViewState["FORMS_ID"]); _obj_smhr_unauthorized.UNAUTHORIZED_MODULEID = Convert.ToInt32(ViewState["MODULE_ID"]); _obj_smhr_unauthorized.UNAUTHORIZED_ACCESSDATE = Convert.ToDateTime(DateTime.Now.ToString()); SMHR.BLL.UnAuthorized_Log(_obj_smhr_unauthorized); Response.Redirect("~/frm_UnAuthorized.aspx", false); } RPT_Form2AddDelFamilyDeclaration.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_Form2AddDelFamilyDeclaration.ServerReport; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); serverReport.ReportPath = MyReportPath + "Form2AddDelFamilyDeclaration"; serverReport.Refresh(); RPT_Form2AddDelFamilyDeclaration.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Form2AddDelFamilyDeclaration", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { rptStr = Convert.ToString(Request.QueryString["rptStr"]); RPT_Report.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_Report.ServerReport; Microsoft.Reporting.WebForms.ReportParameter organisation; Microsoft.Reporting.WebForms.ReportParameter Businessunit; Microsoft.Reporting.WebForms.ReportParameter Organisation; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; if (rptStr == "GWE") { serverReport.ReportPath = MyReportPath + "Gradewiseemployeelist"; } if (rptStr == "ECD") { serverReport.ReportPath = MyReportPath + "EmployeeContractDetails"; } if (rptStr == "GDP") { serverReport.ReportPath = MyReportPath + "GeographicalDistributionOfProfessionalPosts"; } if (rptStr == "RAR") { serverReport.ReportPath = MyReportPath + "RetirementAgeReport"; } if (rptStr == "SDR") { serverReport.ReportPath = MyReportPath + "SpouseOrDependantsReport"; } if (rptStr == "ER") { serverReport.ReportPath = MyReportPath + "EmployeeRegister"; } //serverReport.ReportPath = MyReportPath + "EmployeeFamilyDetails"; //if (Convert.ToString(Request.QueryString["ORG_ID"]) != "") //{ // Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"])); //} //else //{ // Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); //} if (Convert.ToString(Request.QueryString["BU"]) != "") { Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", Convert.ToString(Request.QueryString["BU"])); } else { Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", "-1"); } organisation = new Microsoft.Reporting.WebForms.ReportParameter("organisation", Convert.ToString(Session["ORG_ID"])); Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); if (rptStr == "ECD" || rptStr == "GDP" || rptStr == "RAR" || rptStr == "ER" || rptStr == "SDR") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Businessunit }; serverReport.SetParameters(parameters); } else { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { organisation, Businessunit }; serverReport.SetParameters(parameters); } serverReport.Refresh(); RPT_Report.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "FrmReport1Data", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_Leavebalancesnew.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_Leavebalancesnew.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter PeriodElement; Microsoft.Reporting.WebForms.ReportParameter Status; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "RptLeaveBalances"; if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (Convert.ToString(Request.QueryString["EMP"]) != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["EMP"])); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1"); } if (Convert.ToString(Request.QueryString["PRDDTL"]) != "") { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PRDDTL"])); } else { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); if (Convert.ToString(Request.QueryString["sts"]) != "") { Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", Convert.ToString(Request.QueryString["sts"])); } else { Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Period, Employee, PeriodElement, Organisation, Status }; /// Microsoft.Reporting.WebForms.ReportParameter[] parameters = {Employee,Organisation }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_Leavebalancesnew.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "LeaveBalancesReportNew", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { rv_PFcontribution.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = rv_PFcontribution.ServerReport; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter Organisation; //Microsoft.Reporting.WebForms.ReportParameter Department; Microsoft.Reporting.WebForms.ReportParameter PeriodElement; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "PROVIDENTFUND_CONTRIBUTION"; if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (Convert.ToString(Request.QueryString["PERIODELEMENT"]) != "") { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PERIODELEMENT"])); } else { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } //if (Convert.ToString(Request.QueryString["DEPT"]) != "") //{ // Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEPT"])); //} //else //{ // Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1"); //} Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Period, PeriodElement, BusinessUnit, Organisation }; serverReport.SetParameters(parameters); serverReport.Refresh(); rv_PFcontribution.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "PF_contributionReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_ProvisionalPayslip.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_ProvisionalPayslip.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter PeriodElement; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "PayrollProcess_Before"; if (Convert.ToString(Request.QueryString["Employee"]) != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["Employee"])); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1"); } if (Convert.ToString(Request.QueryString["Organisation"]) != "") { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["Organisation"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (Convert.ToString(Request.QueryString["BusinessUnit"]) != "") { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BusinessUnit"])); } else { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["Period"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["Period"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (Convert.ToString(Request.QueryString["PeriodElement"]) != "") { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PeriodElement"])); } else { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Employee, Organisation, BusinessUnit, Period, PeriodElement }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_ProvisionalPayslip.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "ProvisionalPayslip", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_PreApprovalPayRegister.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_PreApprovalPayRegister.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter PeriodElement; Microsoft.Reporting.WebForms.ReportParameter PayTranId; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); if (Convert.ToString(Request.QueryString["LOCALISATION"]).ToUpper() != "KENYA") { serverReport.ReportPath = MyReportPath + "PreApprovalPayReport"; } else { serverReport.ReportPath = MyReportPath + "PreApprovalPayRegister_Kenya"; } if (Convert.ToString(Request.QueryString["ORG"]) != "") { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (Convert.ToString(Request.QueryString["PRDDTL"]) != "") { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PRDDTL"])); } else { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1"); } if (Convert.ToString(Request.QueryString["PAYTRAN"]) != "") { PayTranId = new Microsoft.Reporting.WebForms.ReportParameter("PayTranId", Convert.ToString(Request.QueryString["PAYTRAN"])); } else { PayTranId = new Microsoft.Reporting.WebForms.ReportParameter("PayTranId", "-1"); } //Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessGroup, Period, PeriodElement, PayTranId }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_PreApprovalPayRegister.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "PreApprovalPayRegisterReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Submit_Click(object sender, EventArgs e) { try { RPT_ExpenseReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_ExpenseReport.ServerReport; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); serverReport.ReportPath = "/SmartHR/" + "Employee Expense Report"; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter StartDate; Microsoft.Reporting.WebForms.ReportParameter EndDate; Microsoft.Reporting.WebForms.ReportParameter Includedates; Microsoft.Reporting.WebForms.ReportParameter Organisation; Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); if (ddl_BusinessUnit.SelectedIndex != 0) { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", ddl_BusinessUnit.SelectedValue); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (ddl_Employee.SelectedIndex != 0) { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(ddl_Employee.SelectedValue)); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1"); } if ((txt_StartDate.SelectedDate != null) && (txt_EndDate.SelectedDate != null)) { Includedates = new Microsoft.Reporting.WebForms.ReportParameter("Includedates", "YES"); StartDate = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", txt_StartDate.SelectedDate.Value.ToShortDateString()); EndDate = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", txt_EndDate.SelectedDate.Value.ToShortDateString()); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Employee, Includedates, StartDate, EndDate }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_ExpenseReport.Visible = true; } if ((txt_StartDate.SelectedDate != null) && (txt_EndDate.SelectedDate == null)) { Includedates = new Microsoft.Reporting.WebForms.ReportParameter("Includedates", "YES"); StartDate = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", txt_StartDate.SelectedDate.Value.ToShortDateString()); EndDate = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", DateTime.Now.ToShortDateString()); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Employee, Includedates, StartDate, EndDate }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_ExpenseReport.Visible = true; } else { Includedates = new Microsoft.Reporting.WebForms.ReportParameter("INCLUDEDATES", "NO"); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Employee, Includedates }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_ExpenseReport.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Expense_Report", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_PensionComputation.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_PensionComputation.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter Directorate; Microsoft.Reporting.WebForms.ReportParameter Department; Microsoft.Reporting.WebForms.ReportParameter Employee; string sDomain = ConfigurationManager.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = ConfigurationManager.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "Pension Computation"; if (Convert.ToString(Request.QueryString["ORG"]) != "" && Convert.ToString(Request.QueryString["ORG"]) != "0") { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "" && Convert.ToString(Request.QueryString["BU"]) != "") { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["DIR"]) != "" && Convert.ToString(Request.QueryString["DIR"]) != "0") { Directorate = new Microsoft.Reporting.WebForms.ReportParameter("Directorate", Convert.ToString(Request.QueryString["DIR"])); } else { Directorate = new Microsoft.Reporting.WebForms.ReportParameter("Directorate", "-1"); } if (Convert.ToString(Request.QueryString["DEP"]) != "" && Convert.ToString(Request.QueryString["DEP"]) != "0") { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEP"])); } else { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1"); } if (Convert.ToString(Request.QueryString["empID"]) != "" && Convert.ToString(Request.QueryString["empID"]) != "0") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["empID"])); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Directorate, Department, Employee }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_PensionComputation.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "PensionComputationReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { string Reportname = Convert.ToString(Request.QueryString["RPTNAME"]); EmployeeList.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = EmployeeList.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter SalaryStructure; Microsoft.Reporting.WebForms.ReportParameter EmployeeType; Microsoft.Reporting.WebForms.ReportParameter FROM; Microsoft.Reporting.WebForms.ReportParameter To; Microsoft.Reporting.WebForms.ReportParameter Tribe; Microsoft.Reporting.WebForms.ReportParameter County; Microsoft.Reporting.WebForms.ReportParameter Directorate; Microsoft.Reporting.WebForms.ReportParameter Department; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; //serverReport.ReportPath = MyReportPath + Convert.ToString(Request.QueryString["RPTNAME"]); switch (Convert.ToString(Request.QueryString["RPTNAME"])) { case "1": serverReport.ReportPath = MyReportPath + "EmployeeList"; break; case "2": serverReport.ReportPath = MyReportPath + "EmployeeList"; break; case "3": serverReport.ReportPath = MyReportPath + "Employee On Disability Tax Exemption"; break; case "4": serverReport.ReportPath = MyReportPath + "Employee List by Service"; break; case "5": serverReport.ReportPath = MyReportPath + "Employee List by County"; break; case "6": serverReport.ReportPath = MyReportPath + "Transfer Due by Cash"; break; case "7": serverReport.ReportPath = MyReportPath + "Employee List by Age"; break; case "8": serverReport.ReportPath = MyReportPath + "Employee List by Ethnicity"; break; case "9": serverReport.ReportPath = MyReportPath + "EmployeeListDepartment"; break; case "10": serverReport.ReportPath = MyReportPath + "EmployeeListDepartment"; break; case "11": serverReport.ReportPath = MyReportPath + "EmployeeListDepartment"; break; case "12": serverReport.ReportPath = MyReportPath + "Employee House Allowance"; break; case "13": serverReport.ReportPath = MyReportPath + "Allocation Code"; break; case "14": serverReport.ReportPath = MyReportPath + "Employee Type"; break; } if (Convert.ToString(Request.QueryString["ORG_ID"]) != "" && Convert.ToString(Request.QueryString["ORG_ID"]) != null) { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "" && Convert.ToString(Request.QueryString["BU"]) != null) { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["SAL"]) != "" && Convert.ToString(Request.QueryString["SAL"]) != null) { SalaryStructure = new Microsoft.Reporting.WebForms.ReportParameter("SalaryStructure", Convert.ToString(Request.QueryString["SAL"])); } else { SalaryStructure = new Microsoft.Reporting.WebForms.ReportParameter("SalaryStructure", "-1"); } if (Convert.ToString(Request.QueryString["EMPTYPE"]) != "" && Convert.ToString(Request.QueryString["EMPTYPE"]) != null) { EmployeeType = new Microsoft.Reporting.WebForms.ReportParameter("EmployeeType", Convert.ToString(Request.QueryString["EMPTYPE"])); } else { EmployeeType = new Microsoft.Reporting.WebForms.ReportParameter("EmployeeType", "-1"); } if (Convert.ToString(Request.QueryString["CTY"]) != "" && Convert.ToString(Request.QueryString["CTY"]) != null) { County = new Microsoft.Reporting.WebForms.ReportParameter("County", Convert.ToString(Request.QueryString["CTY"])); } else { County = new Microsoft.Reporting.WebForms.ReportParameter("County", "-1"); } if (Convert.ToString(Request.QueryString["FRM"]) != "" && Convert.ToString(Request.QueryString["FRM"]) != null) { FROM = new Microsoft.Reporting.WebForms.ReportParameter("FROM", Convert.ToString(Request.QueryString["FRM"])); } else { FROM = new Microsoft.Reporting.WebForms.ReportParameter("FROM", "-1"); } if (Convert.ToString(Request.QueryString["To"]) != "" && Convert.ToString(Request.QueryString["To"]) != null) { To = new Microsoft.Reporting.WebForms.ReportParameter("To", Convert.ToString(Request.QueryString["To"])); } else { To = new Microsoft.Reporting.WebForms.ReportParameter("To", "-1"); } if (Convert.ToString(Request.QueryString["TRB"]) != "" && Convert.ToString(Request.QueryString["TRB"]) != null) { Tribe = new Microsoft.Reporting.WebForms.ReportParameter("Tribe", Convert.ToString(Request.QueryString["TRB"])); } else { Tribe = new Microsoft.Reporting.WebForms.ReportParameter("Tribe", "-1"); } if (Convert.ToString(Request.QueryString["DI"]) != "" && Convert.ToString(Request.QueryString["DI"]) != null) { Directorate = new Microsoft.Reporting.WebForms.ReportParameter("Directorate", Convert.ToString(Request.QueryString["DI"])); } else { Directorate = new Microsoft.Reporting.WebForms.ReportParameter("Directorate", "-1"); } if (Convert.ToString(Request.QueryString["DE"]) != "" && Convert.ToString(Request.QueryString["DE"]) != null) { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DE"])); } else { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1"); } //if (Reportname == "EmployeeList") if (Reportname == "1" || Reportname == "2" || Reportname == "14") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, SalaryStructure, EmployeeType }; serverReport.SetParameters(parameters); } //else if (Reportname == "Employee On Disability Tax Exemption" || Reportname == "Employee List by Service") else if (Reportname == "3" || Reportname == "4") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, SalaryStructure }; serverReport.SetParameters(parameters); } //else if (Reportname == "Transfer Due by Cash") else if (Reportname == "6" || Reportname == "12" || Reportname == "13") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit }; serverReport.SetParameters(parameters); } //else if (Reportname == "Employee List by County" else if (Reportname == "5") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, County }; serverReport.SetParameters(parameters); } //else if (Reportname == "Employee List by Age") else if (Reportname == "7") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, FROM, To }; serverReport.SetParameters(parameters); } //else if (Reportname == "Employee List by Ethnicity") else if (Reportname == "8") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Tribe }; serverReport.SetParameters(parameters); } //else if (Reportname == "EmployeeListDepartment") else if (Reportname == "9" || Reportname == "10" || Reportname == "11") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Directorate, Department }; serverReport.SetParameters(parameters); } serverReport.Refresh(); EmployeeList.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "EmployeeListReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_SalarySlip.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_SalarySlip.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter PeriodDetails; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string Report_Name = string.Empty; if (Convert.ToString(Request.QueryString["Localisation"]) == "AUSTRALIA") { Report_Name = "SalarySlip_Australia"; } else if (Convert.ToString(Request.QueryString["Localisation"]) == "INDIA") { Report_Name = "SalarySlip"; } else { Report_Name = "SalarySlip_Kenya"; } serverReport.ReportPath = MyReportPath + Report_Name; if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (Convert.ToString(Request.QueryString["PRDDTL"]) != "") { PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PRDDTL"])); } else { PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1"); } if (Convert.ToString(Request.QueryString["EMP"]) != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["EMP"])); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessGroup, Employee, Period, PeriodDetails }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_SalarySlip.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "SalarySlipReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_CmprsnRptWithPrevMnth.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_CmprsnRptWithPrevMnth.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter PeriodElement; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter Status; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string Report_Name = string.Empty; Report_Name = "RptWithreportWithPreviousMonth"; serverReport.ReportPath = MyReportPath + Report_Name; if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (Convert.ToString(Request.QueryString["PRDDTL"]) != "") { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PRDDTL"])); } else { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1"); } if (Convert.ToString(Request.QueryString["ORG"]) != "") { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (Convert.ToString(Request.QueryString["sts"]) != "") { Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", Convert.ToString(Request.QueryString["sts"])); } else { Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Period, PeriodElement, Status }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_CmprsnRptWithPrevMnth.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "CmprsnRptWithPrevMnthReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_terminateEmployee.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_terminateEmployee.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Businessunit; Microsoft.Reporting.WebForms.ReportParameter STARTDATE; Microsoft.Reporting.WebForms.ReportParameter ENDDATE; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Department; Microsoft.Reporting.WebForms.ReportParameter Directorate; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; //OG=' + org + '&BU=' + buid + '&DER=' + derict+'&DEP='+depart+'&FMDATE='+frmdate+'&TDAT='+Tdate, "RadWindow1"); serverReport.ReportPath = MyReportPath + "Terminated Employees"; if (Convert.ToString(Request.QueryString["DEP"]) != "") { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEP"])); } else { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", Convert.ToString(Request.QueryString["BU"])); } else { Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", "-1"); } if (Convert.ToString(Request.QueryString["TDAT"]) != "") { ENDDATE = new Microsoft.Reporting.WebForms.ReportParameter("ENDDATE", Convert.ToString(Request.QueryString["TDAT"])); } else { ENDDATE = new Microsoft.Reporting.WebForms.ReportParameter("ENDDATE", "-1"); } if (Convert.ToString(Request.QueryString["FMDATE"]) != "") { STARTDATE = new Microsoft.Reporting.WebForms.ReportParameter("STARTDATE", Convert.ToString(Request.QueryString["FMDATE"])); } else { STARTDATE = new Microsoft.Reporting.WebForms.ReportParameter("STARTDATE", "-1"); } if (Convert.ToString(Request.QueryString["DER"]) != "") { Directorate = new Microsoft.Reporting.WebForms.ReportParameter("Directorate", Convert.ToString(Request.QueryString["DER"])); } else { Directorate = new Microsoft.Reporting.WebForms.ReportParameter("Directorate", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, STARTDATE, ENDDATE, Businessunit, Department, Directorate }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_terminateEmployee.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Frm_TerminatedEmployeesReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { rptStr = Convert.ToString(Request.QueryString["rptStr"]); RPT_Report2.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_Report2.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter Businessunit; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter PeriodDetails; string sDomain = ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; if (rptStr == "EBG") { serverReport.ReportPath = MyReportPath + "EmployeeBasicandgrosssalaryvariation"; } if (rptStr == "PD") { serverReport.ReportPath = MyReportPath + "paymentandDeduction"; } if (rptStr == "EMT") { serverReport.ReportPath = MyReportPath + "Employeemonthlytransaction"; } // serverReport.ReportPath = MyReportPath + "PayRegister"; if (Convert.ToString(Request.QueryString["ORG_ID"]) != "") { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", "-1"); } if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (Convert.ToString(Request.QueryString["prdDtl"]) != "") { PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetails", Convert.ToString(Request.QueryString["prdDtl"])); } else { PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetails", "-1"); } if (rptStr == "EBG") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Period, PeriodDetails }; serverReport.SetParameters(parameters); } if (rptStr == "PD" || rptStr == "EMT") { Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Businessunit, Period, PeriodDetails }; serverReport.SetParameters(parameters); } serverReport.Refresh(); RPT_Report2.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "FrmReport2Data", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { rv_payslip.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = rv_payslip.ServerReport; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Department; Microsoft.Reporting.WebForms.ReportParameter Employee; string sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"]; WebClient Wc = new WebClient(); Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials(); serverReport.ReportServerCredentials = _ObjNC; serverReport.ReportServerUrl = new Uri(sDomain); string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"]; serverReport.ReportPath = MyReportPath + "Pay_Slip"; if (Convert.ToString(Request.QueryString["PRD"]) != "") { Period = new Microsoft.Reporting.WebForms.ReportParameter("PERIOD", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("PERIOD", "-1"); } if (Convert.ToString(Request.QueryString["EMP"]) != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("EMPLOYEE", Convert.ToString(Request.QueryString["EMP"])); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("EMPLOYEE", "-1"); } if (Convert.ToString(Request.QueryString["BU"]) != "") { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BUSINESSUNIT", Convert.ToString(Request.QueryString["BU"])); } else { BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BUSINESSUNIT", "-1"); } if (Convert.ToString(Request.QueryString["DEPT"]) != "") { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEPT"])); } else { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organization", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Period, Employee, BusinessGroup, Department, Organisation }; serverReport.SetParameters(parameters); serverReport.Refresh(); rv_payslip.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Employee_PaySlipReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }