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_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_PayRegisterAnnualRowWise.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_PayRegisterAnnualRowWise.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 + "PayRegisterAnnual"; 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, Period }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_PayRegisterAnnualRowWise.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "PayRegisterAnnualRowWiseReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_P9Report1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_P9Report1.ServerReport; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Employee; //if (Convert.ToString(Request.QueryString["DEPT"]) != null) //{ // 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"]) != null) { 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"]) != null) { 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"]) != null) { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["PRD"])); } 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 = { Organisation, Period, BusinessGroup, Employee }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_P9Report1.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Default3", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { RPT_NextToKin.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_NextToKin.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 + "NextToKinReport"; 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 { 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_NextToKin.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "NextToKinReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_Form6A.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_Form6A.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter FromDate; Microsoft.Reporting.WebForms.ReportParameter ToDate; 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 + "Form6A"; 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["PRD"]) != "") { FromDate = new Microsoft.Reporting.WebForms.ReportParameter("FromDate", Convert.ToString(Request.QueryString["PRD"])); } else { FromDate = new Microsoft.Reporting.WebForms.ReportParameter("FromDate", "-1"); } if (Convert.ToString(Request.QueryString["EDATE"]) != "") { ToDate = new Microsoft.Reporting.WebForms.ReportParameter("ToDate", Convert.ToString(Request.QueryString["EDATE"])); } else { ToDate = new Microsoft.Reporting.WebForms.ReportParameter("ToDate", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, FromDate, ToDate }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_Form6A.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Form6AReport", 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 (!IsPostBack) { RPT_EmpLoans.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_EmpLoans.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/" + "EmpLoansReport"; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter Organisation; 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["EMP"]) != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["EMP"])); } 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 = { BusinessGroup, Employee, Organisation }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_EmpLoans.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "EmpLoansReport", 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 BindServerReport(MsServerReport serverReport, IReport report) { IRemoteReportProcessingLocation location = (IRemoteReportProcessingLocation)report.ReportProcessingLocation; try { // ReSharper disable once UnusedVariable using (ImpersonationCodeSection i = ImpersonationCredentials.FromConnectionString("AnalysisServices").LogOn()) { serverReport.ReportPath = location.Path; serverReport.ReportServerUrl = location.ServerUrl; if (serverReport.IsDrillthroughReport) { // do not need to handle the callback } else { IList <MsReportParameter> parameters = new List <MsReportParameter>(); foreach (IReportParameter parameter in report.ReportParameters) { parameters.Add(new MsReportParameter(parameter.Name, GetParameterValue(parameter))); } serverReport.SetParameters(parameters); } serverReport.Refresh(); } } catch { // can do nothing ? } }
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 (!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) { RPT_PreApprovalPayReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_PreApprovalPayReport.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 Employee; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter PayTranId; string sDomain = ConfigurationManager.AppSettings["MyReportViewerDomain"]; string MyReportPath = ConfigurationManager.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 + "Provisional Pay Slip"; /////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"])); BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"])); } else { BusinessGroup = 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"]) != "") { 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["EMPID"]) != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["EMPID"])); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-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, Employee }; /// Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Period, PeriodElement, PayTranId }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_PreApprovalPayReport.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frmPreApprovalPayReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_WorkmansCompensation.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_WorkmansCompensation.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Scale; Microsoft.Reporting.WebForms.ReportParameter FromDate; Microsoft.Reporting.WebForms.ReportParameter ToDate; 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"]; serverReport.ReportPath = MyReportPath + "Workmans compensation"; //Scale = new Microsoft.Reporting.WebForms.ReportParameter("Scale", "26"); //FromDate = new Microsoft.Reporting.WebForms.ReportParameter("FromDate", "01-01-1900"); //ToDate = new Microsoft.Reporting.WebForms.ReportParameter("ToDate", "01-01-1900"); //PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetails", "287"); //Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "0"); if (string.Compare(Request.QueryString["RPTTYPE"], "ScaleWise", true) == 0 && Request.QueryString["SCL"] != null) { Scale = new Microsoft.Reporting.WebForms.ReportParameter("Scale", Convert.ToString(Request.QueryString["SCL"])); } else { Scale = new Microsoft.Reporting.WebForms.ReportParameter("Scale", "-1"); } if (Convert.ToString(Request.QueryString["FD"]) != null && !string.IsNullOrEmpty(Request.QueryString["FD"])) { FromDate = new Microsoft.Reporting.WebForms.ReportParameter("FromDate", Convert.ToDateTime(Request.QueryString["FD"]).ToString("MM/dd/yyyy")); } else { FromDate = new Microsoft.Reporting.WebForms.ReportParameter("FromDate", "01-01-1900"); } if (Convert.ToString(Request.QueryString["TD"]) != null && !string.IsNullOrEmpty(Request.QueryString["TD"])) { ToDate = new Microsoft.Reporting.WebForms.ReportParameter("ToDate", Convert.ToDateTime(Request.QueryString["TD"]).ToString("MM/dd/yyyy")); } else { ToDate = new Microsoft.Reporting.WebForms.ReportParameter("ToDate", "01-01-1900"); } if (string.Compare(Request.QueryString["RPTTYPE"], "Monthly", true) == 0 && Convert.ToString(Request.QueryString["PRD"]) != null) { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"])); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (string.Compare(Request.QueryString["RPTTYPE"], "Monthly", true) == 0 && Convert.ToString(Request.QueryString["PRDDTL"]) != null) { PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetails", Convert.ToString(Request.QueryString["PRDDTL"])); } else { PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetails", "-1"); } //EMP_LOGIN_ID = new Microsoft.Reporting.WebForms.ReportParameter("EMP_LOGIN_ID", Convert.ToString(Session["USER_ID"])); Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Scale, FromDate, ToDate, Period, PeriodDetails }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_WorkmansCompensation.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "WorkmansCompensationReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Generate_Click(object sender, EventArgs e) { try { DataTable dtEMPData2 = BLL.USP_SMHR_EMP_BEFORE_PROVISION_TEMP(Convert.ToInt32(rcmb_Employee.SelectedValue)); DataTable dtEMPData3 = BLL.USP_SMHR_PERIODDETAILS_emp("GetDateData"); prdID = Convert.ToInt32(dtEMPData3.Rows[0]["PRDDTL_PERIOD_ID"]); prdDtlID = Convert.ToInt32(dtEMPData3.Rows[0]["PRDDTL_ID"]); //Session["PRDDTL_PERIOD_ID"] = dtEMPData3.Rows[0]["PRDDTL_PERIOD_ID"].ToString(); //Session["PRDDTL_ID"] = dtEMPData3.Rows[0]["PRDDTL_ID"].ToString(); //ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "ShowPop('" + Convert.ToString(rcmb_Employee.SelectedValue) + "','" + // Session["emp_organistation_id"] + "', '" + Session["emp_businessunit_id"] + "', '" + Session["PRDDTL_PERIOD_ID"] + Session["PRDDTL_ID"] + "');", true); 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 (rcmb_Employee.SelectedValue != "") { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(rcmb_Employee.SelectedValue)); } else { Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1"); } if (Convert.ToString(Session["ORG_ID"]) != "") { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); } else { Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1"); } if (buID > 0) { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(buID)); } else { BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1"); } if (prdID > 0) { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(prdID)); } else { Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1"); } if (prdDtlID > 0) { PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(prdDtlID)); } 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; rwPreAprPaySlip.VisibleOnPageLoad = true; } catch (Exception ex) { if (ex.Message == "FAILEDTRANS") { //BLL.ShowMessage(this, "No Payelements found for selected Employee"); BLL.ShowMessage(this, "Assign Pay Elements for selected Employee"); return; } SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "ProvisionalPayslipBefore", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { RPT_MonitoringEmployeePensionContributionReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_MonitoringEmployeePensionContributionReport.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter Directorate; Microsoft.Reporting.WebForms.ReportParameter Department; Microsoft.Reporting.WebForms.ReportParameter SubDepartment; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter year; Microsoft.Reporting.WebForms.ReportParameter month; 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 + "Employee Pension Details"; Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"])); 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["Department"]) != "") { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department ", Convert.ToString(Request.QueryString["Department"])); } else { Department = new Microsoft.Reporting.WebForms.ReportParameter("Department ", "-1"); } if (Convert.ToString(Request.QueryString["Directorate"]) != "") { Directorate = new Microsoft.Reporting.WebForms.ReportParameter("Directorate", Convert.ToString(Request.QueryString["Directorate"])); } else { Directorate = new Microsoft.Reporting.WebForms.ReportParameter("Directorate", "-1"); } if (Convert.ToString(Request.QueryString["SubDivision"]) != "") { SubDepartment = new Microsoft.Reporting.WebForms.ReportParameter("SubDivision", Convert.ToString(Request.QueryString["SubDivision"])); } else { SubDepartment = new Microsoft.Reporting.WebForms.ReportParameter("SubDivision", "-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["year"]) != "") { year = new Microsoft.Reporting.WebForms.ReportParameter("Year", Convert.ToString(Request.QueryString["year"])); } else { year = new Microsoft.Reporting.WebForms.ReportParameter("Year", "-1"); } if (Convert.ToString(Request.QueryString["month"]) != "") { month = new Microsoft.Reporting.WebForms.ReportParameter("Month", Convert.ToString(Request.QueryString["month"])); } else { month = new Microsoft.Reporting.WebForms.ReportParameter("Month", "-1"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessGroup, Directorate, Department, year, month, SubDepartment, Employee }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_MonitoringEmployeePensionContributionReport.Visible = true; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "MonitoringEmployeePensionContributionReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_LocationWiseTraining.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_LocationWiseTraining.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter Location; Microsoft.Reporting.WebForms.ReportParameter Course; Microsoft.Reporting.WebForms.ReportParameter Batch; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter PeriodDetail; 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["LT"]) != "" && Convert.ToString(Request.QueryString["LT"]) != "0") { Location = new Microsoft.Reporting.WebForms.ReportParameter("Location", Convert.ToString(Request.QueryString["LT"])); } else { Location = new Microsoft.Reporting.WebForms.ReportParameter("Location", "-1"); } if (Convert.ToString(Request.QueryString["CRSE"]) != "") { Course = new Microsoft.Reporting.WebForms.ReportParameter("Course", Convert.ToString(Request.QueryString["CRSE"])); } else { Course = new Microsoft.Reporting.WebForms.ReportParameter("Course", "-1"); } if (Convert.ToString(Request.QueryString["BTCH"]) != "") { Batch = new Microsoft.Reporting.WebForms.ReportParameter("Batch", Convert.ToString(Request.QueryString["BTCH"])); } else { Batch = new Microsoft.Reporting.WebForms.ReportParameter("Batch", "-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"]) != "") { PeriodDetail = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetail", Convert.ToString(Request.QueryString["PRDDTL"])); } else { PeriodDetail = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetail", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters; if (Convert.ToString(Request.QueryString["RPT"]) == "Location Wise Training Programs") { parameters = new Microsoft.Reporting.WebForms.ReportParameter[] { Organisation, Location, Course, Batch, Period, PeriodDetail }; } else { parameters = new Microsoft.Reporting.WebForms.ReportParameter[] { Organisation, Course, Batch }; } serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_LocationWiseTraining.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "LocationWiseTrainingProgramReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_EmpRatingDetailsReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_EmpRatingDetailsReport.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter AppraisalCycle; Microsoft.Reporting.WebForms.ReportParameter Status; 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 + "ConsolidationRatingReport"; 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["AppCycle"]) != "") { AppraisalCycle = new Microsoft.Reporting.WebForms.ReportParameter("AppraisalCycle", Convert.ToString(Request.QueryString["AppCycle"])); } else { AppraisalCycle = new Microsoft.Reporting.WebForms.ReportParameter("AppraisalCycle", "-1"); } if (Convert.ToString(Request.QueryString["Status"]) != "") { Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", Convert.ToString(Request.QueryString["Status"])); } else { Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", "Completed"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, AppraisalCycle, Status }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_EmpRatingDetailsReport.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Pms_EmpRatingReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_Death_Employees.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_Death_Employees.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter StartDate; Microsoft.Reporting.WebForms.ReportParameter EndDate; Microsoft.Reporting.WebForms.ReportParameter Checked; //Microsoft.Reporting.WebForms.ReportParameter Period; 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 + "Death_EmployeesReport"; 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"]) != "") { 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"]) != "") { StartDate = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", Convert.ToString(Request.QueryString["From"])); Checked = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", Convert.ToString(1)); } else { Checked = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", Convert.ToString(0)); StartDate = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", "01/01/2010"); } if (Convert.ToString(Request.QueryString["To"]) != "") { EndDate = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", Convert.ToString(Request.QueryString["To"])); Checked = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", Convert.ToString(1)); } else { Checked = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", Convert.ToString(0)); EndDate = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", "01/01/2010"); } //if (Convert.ToString(Request.QueryString["CHK"]) != "") //{ // if (Convert.ToString(Request.QueryString["CHK"]) == "true") // { // Checked = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", Convert.ToString(1)); // } // else // { // Checked = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", Convert.ToString(0)); // } //} //else //{ // Checked = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", "-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, StartDate, EndDate, Checked }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_Death_Employees.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Death_EmployeesReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { //RPT_RegstrUnRegstrAccStmts.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; //Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); //serverReport = RPT_RegstrUnRegstrAccStmts.ServerReport; //Microsoft.Reporting.WebForms.ReportParameter Organisation; //Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; //Microsoft.Reporting.WebForms.ReportParameter Period; //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 = System.Configuration.ConfigurationManager.AppSettings["MyReportPath"]; RPT_RegstrUnRegstrAccStmts.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_RegstrUnRegstrAccStmts.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter Period; 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 + "Register And Unregister Account Statements"; if (Convert.ToString(Request.QueryString["RPT"]) == "PenCont") { serverReport.ReportPath = MyReportPath + "Employee and Employer Pension Contribution"; } else { serverReport.ReportPath = MyReportPath + "Register And Unregister Account Statements"; } 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"]) != "0") { 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["PRD"]) != "" && Convert.ToString(Request.QueryString["PRD"]) != "0") { 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["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"); } //Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Period, Employee }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_RegstrUnRegstrAccStmts.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "RegstrUnRegstrAccStmtsReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { #region Commented2 /*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 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(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(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_Report.Visible = true;*/ #endregion 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 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"; } 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(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_Report.Visible = true; #region Commented /*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;*/ #endregion } } 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 (!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) { RPT_MedicalStatement.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_MedicalStatement.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter PeriodDetail; Microsoft.Reporting.WebForms.ReportParameter Scale; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter Type; 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 + "Medical Statements"; //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["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"]) != "") { PeriodDetail = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetail", Convert.ToString(Request.QueryString["PRDDTL"])); } else { PeriodDetail = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetail", "-1"); } if (Convert.ToString(Request.QueryString["SCL"]) != "") { Scale = new Microsoft.Reporting.WebForms.ReportParameter("Scale", Convert.ToString(Request.QueryString["SCL"])); } else { Scale = new Microsoft.Reporting.WebForms.ReportParameter("Scale", "-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["TYP"]) != "") { Type = new Microsoft.Reporting.WebForms.ReportParameter("Type", Convert.ToString(Request.QueryString["TYP"])); } else { Type = new Microsoft.Reporting.WebForms.ReportParameter("Type", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Period, PeriodDetail, Scale, Employee, Type }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_MedicalStatement.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "MedicalStatementReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { RPT_MembersofParliamentReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_MembersofParliamentReport.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessUnit; Microsoft.Reporting.WebForms.ReportParameter SalStruct; Microsoft.Reporting.WebForms.ReportParameter Period; Microsoft.Reporting.WebForms.ReportParameter Perioddetail; Microsoft.Reporting.WebForms.ReportParameter Mode; 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 + "MPSStaffContribution"; if (Convert.ToString(Request.QueryString["CRTL"]) == "StaffContribution") { Mode = new Microsoft.Reporting.WebForms.ReportParameter("Mode", "1"); } else { Mode = new Microsoft.Reporting.WebForms.ReportParameter("Mode", "0"); } 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["PRDE"]) != "") { Perioddetail = new Microsoft.Reporting.WebForms.ReportParameter("Perioddetail", Convert.ToString(Request.QueryString["PRDE"])); } else { Perioddetail = new Microsoft.Reporting.WebForms.ReportParameter("Perioddetail", "-1"); } if (Convert.ToString(Request.QueryString["SALS"]) != "") { SalStruct = new Microsoft.Reporting.WebForms.ReportParameter("SalStruct", Convert.ToString(Request.QueryString["SALS"])); } else { SalStruct = new Microsoft.Reporting.WebForms.ReportParameter("SalStruct", "-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"); } Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, SalStruct, Period, Perioddetail, Mode }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_MembersofParliamentReport.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "MembersofParliamentReport", 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 (!Page.IsPostBack) { RPT_EmployeeDetails.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_EmployeeDetails.ServerReport; Microsoft.Reporting.WebForms.ReportParameter Organisation; Microsoft.Reporting.WebForms.ReportParameter BusinessGroup; Microsoft.Reporting.WebForms.ReportParameter EMP_LOGIN_ID; Microsoft.Reporting.WebForms.ReportParameter STARTDATE; Microsoft.Reporting.WebForms.ReportParameter ENDDATE; 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 + "EmployeeDetailsReport"; 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"]) != "") { 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["SD"]) != "") { STARTDATE = new Microsoft.Reporting.WebForms.ReportParameter("STARTDATE", Convert.ToString(Request.QueryString["SD"])); } else { STARTDATE = new Microsoft.Reporting.WebForms.ReportParameter("STARTDATE", "01-01-1900"); } if (Convert.ToString(Request.QueryString["ED"]) != "") { ENDDATE = new Microsoft.Reporting.WebForms.ReportParameter("ENDDATE", Convert.ToString(Request.QueryString["ED"])); } else { ENDDATE = new Microsoft.Reporting.WebForms.ReportParameter("ENDDATE", "01-01-1900"); } EMP_LOGIN_ID = new Microsoft.Reporting.WebForms.ReportParameter("EMP_LOGIN_ID", Convert.ToString(Session["USER_ID"])); Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessGroup, EMP_LOGIN_ID, STARTDATE, ENDDATE }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_EmployeeDetails.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "EmployeeDetailsReport", 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) { RPT_LoanDetails.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport); serverReport = RPT_LoanDetails.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 SubDepartment; Microsoft.Reporting.WebForms.ReportParameter Employee; Microsoft.Reporting.WebForms.ReportParameter Loantype; 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 + "All Loans"; if (Convert.ToString(Request.QueryString["RPT"]) != "") { serverReport.ReportPath = MyReportPath + Convert.ToString(Request.QueryString["RPT"]); } else { serverReport.ReportPath = MyReportPath + "All Loans"; } 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["DIR"]) != "") { 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["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["SDEPT"]) != "") //{ // SubDepartment = new Microsoft.Reporting.WebForms.ReportParameter("SubDepartment", Convert.ToString(Request.QueryString["SDEPT"])); //} //else //{ // SubDepartment = new Microsoft.Reporting.WebForms.ReportParameter("SubDepartment", "-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["LT"]) != "") { Loantype = new Microsoft.Reporting.WebForms.ReportParameter("Loantype", Convert.ToString(Request.QueryString["LT"])); } else { Loantype = new Microsoft.Reporting.WebForms.ReportParameter("Loantype", "-1"); } Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"])); //Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Businessunit, Directorate, Department, SubDepartment, Employee, Loantype }; Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Businessunit, Directorate, Department, Employee, Loantype }; //Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Employee, Loantype }; serverReport.SetParameters(parameters); serverReport.Refresh(); RPT_LoanDetails.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "LoanDetailsReport", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }