Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                RPT_DependentReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_DependentReport.ServerReport;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter Department;
                string    sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                WebClient Wc      = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                serverReport.ReportPath = MyReportPath + "DependentsInformation";
                if (Convert.ToString(Request.QueryString["DEPT"]) != "")
                {
                    Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEPT"]));
                }
                else
                {
                    Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1");
                }
                if (Convert.ToString(Request.QueryString["BU"]) != "")
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"]));
                }
                else
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1");
                }

                if (Convert.ToString(Request.QueryString["PRD"]) != "")
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"]));
                }
                else
                {
                    DateTime dt = new DateTime();
                    dt     = Convert.ToDateTime(DateTime.Now.Date);
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(dt));
                }
                Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Period, BusinessGroup, Department };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_DependentReport.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "DependentsInformationReports", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                RPT_EmployeeLeavesDetails.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_EmployeeLeavesDetails.ServerReport;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                Microsoft.Reporting.WebForms.ReportParameter FromDate;
                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter ToDate;
                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 + "EmployeeLeavesDetails";
                if (Convert.ToString(Request.QueryString["TO"]) != "")
                {
                    ToDate = new Microsoft.Reporting.WebForms.ReportParameter("PeriodEnddate", Convert.ToString(Request.QueryString["TO"]));
                }
                else
                {
                    ToDate = new Microsoft.Reporting.WebForms.ReportParameter("PeriodEnddate", "-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"]) != "")
                {
                    FromDate = new Microsoft.Reporting.WebForms.ReportParameter("PeriodStartdate", Convert.ToString(Request.QueryString["FROM"]));
                }
                else
                {
                    FromDate = new Microsoft.Reporting.WebForms.ReportParameter("PeriodStartdate", "-1");
                }
                Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, FromDate, BusinessGroup, ToDate };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_EmployeeLeavesDetails.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "EmployeeLeaveDetailsReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                RPT_JobOfferReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_JobOfferReport.ServerReport;
                RPT_JobOfferReport.AsyncRendering = false;
                if (!RPT_JobOfferReport.Enabled)
                {
                    RPT_JobOfferReport.CurrentPage = 1;
                }


                string    sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                WebClient Wc      = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                serverReport.ReportPath = MyReportPath + "JobOffer";
                Microsoft.Reporting.WebForms.ReportParameter ApplicantId;
                Microsoft.Reporting.WebForms.ReportParameter JobId;
                if (Convert.ToString(Request.QueryString["ApplicantId"]) != "")
                {
                    ApplicantId = new Microsoft.Reporting.WebForms.ReportParameter("ApplicantId", Session["JOBOFFRS_APPLICANT_ID"].ToString());
                    //  Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"]));
                }
                else
                {
                    ApplicantId = new Microsoft.Reporting.WebForms.ReportParameter("ApplicantId", "-1");
                }
                if (Convert.ToString(Request.QueryString["JobId"]) != "")
                {
                    JobId = new Microsoft.Reporting.WebForms.ReportParameter("JobId", Session["JOBOFFRS_REQCODE"].ToString());
                    //  Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG_ID"]));
                }
                else
                {
                    JobId = new Microsoft.Reporting.WebForms.ReportParameter("JobId", "-1");
                }



                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { ApplicantId, JobId };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_JobOfferReport.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "JobOfferReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 4
0
 protected void btn_Submit_Click(object sender, EventArgs e)
 {
     try
     {
         RPT_WhtReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
         Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
         serverReport = RPT_WhtReport.ServerReport;
         RPT_WhtReport.AsyncRendering = false;
         if (!RPT_WhtReport.Enabled)
         {
             RPT_WhtReport.CurrentPage = 1;
         }
         string    sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"];
         WebClient Wc      = new WebClient();
         Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
         serverReport.ReportServerCredentials = _ObjNC;
         serverReport.ReportServerUrl         = new Uri(sDomain);
         serverReport.ReportPath = "/SmartHR/" + "WHTreport";
         Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
         Microsoft.Reporting.WebForms.ReportParameter Period;
         Microsoft.Reporting.WebForms.ReportParameter Organisation;
         Microsoft.Reporting.WebForms.ReportParameter Department;
         if (ddl_Department.SelectedIndex != 0)
         {
             Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", ddl_Department.SelectedValue);
         }
         else
         {
             Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1");
         }
         if (ddl_BusinessUnit.SelectedIndex != 0)
         {
             BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", ddl_BusinessUnit.SelectedValue);
         }
         else
         {
             BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1");
         }
         if (rcmb_payElements.SelectedIndex != 0)
         {
             Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(rcmb_payElements.SelectedValue));
         }
         else
         {
             Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1");
         }
         Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
         Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Period, BusinessGroup, Department };
         serverReport.SetParameters(parameters);
         serverReport.Refresh();
         RPT_WhtReport.Visible = true;
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Wht", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = ReportViewer1.ServerReport;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter Department;
                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");
                }
                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();
                ReportViewer1.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Default2", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                rvGratuityReportZSReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = rvGratuityReportZSReport.ServerReport;

                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter Businessunit;

                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 + "GrauityReport-ZurichSystems";

                if (Convert.ToString(Request.QueryString["zsBU"]) != "")
                {
                    Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", Convert.ToString(Request.QueryString["zsBU"]));
                }
                else
                {
                    Businessunit = new Microsoft.Reporting.WebForms.ReportParameter("Businessunit", "-1");
                }

                Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Businessunit };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                rvGratuityReportZSReport.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frmGratuityReportZSReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!Page.IsPostBack)
         {
             rv_AssignmentDetails.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
             Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
             serverReport = rv_AssignmentDetails.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/" + "AssignmentDetails";
             serverReport.Refresh();
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Emp_AssignmentDetails", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
Esempio n. 8
0
        protected void BindServerReport(MsServerReport serverReport, IReport report)
        {
            IRemoteReportProcessingLocation location = (IRemoteReportProcessingLocation)report.ReportProcessingLocation;

            try
            {
                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 ?
            }
        }
Esempio n. 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                RPT_SalarySlip.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_SalarySlip.ServerReport;

                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                Microsoft.Reporting.WebForms.ReportParameter Employee;
                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter PeriodDetails;

                string    sDomain      = ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                string    MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                WebClient wc           = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                string Report_Name = string.Empty;
                if (Convert.ToString(Request.QueryString["Localisation"]) == "AUSTRALIA")
                {
                    Report_Name = "SalarySlip_Australia";
                }
                else if (Convert.ToString(Request.QueryString["Localisation"]) == "INDIA")
                {
                    Report_Name = "SalarySlip";
                }
                else
                {
                    Report_Name = "SalarySlip_Kenya";
                }
                serverReport.ReportPath = MyReportPath + Report_Name;
                if (Convert.ToString(Request.QueryString["PRD"]) != "")
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"]));
                }
                else
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1");
                }
                if (Convert.ToString(Request.QueryString["PRDDTL"]) != "")
                {
                    PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PRDDTL"]));
                }
                else
                {
                    PeriodDetails = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1");
                }
                if (Convert.ToString(Request.QueryString["EMP"]) != "")
                {
                    Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["EMP"]));
                }
                else
                {
                    Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1");
                }
                if (Convert.ToString(Request.QueryString["BU"]) != "")
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"]));
                }
                else
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1");
                }
                Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessGroup, Employee, Period, PeriodDetails };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_SalarySlip.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "SalarySlipReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                RPT_CmprsnRptWithPrevMnth.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_CmprsnRptWithPrevMnth.ServerReport;

                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter PeriodElement;
                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter BusinessUnit;
                Microsoft.Reporting.WebForms.ReportParameter Status;


                string    sDomain      = ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                string    MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                WebClient wc           = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                string Report_Name = string.Empty;
                Report_Name             = "RptWithreportWithPreviousMonth";
                serverReport.ReportPath = MyReportPath + Report_Name;
                if (Convert.ToString(Request.QueryString["PRD"]) != "")
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"]));
                }
                else
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1");
                }
                if (Convert.ToString(Request.QueryString["PRDDTL"]) != "")
                {
                    PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PRDDTL"]));
                }
                else
                {
                    PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1");
                }
                if (Convert.ToString(Request.QueryString["ORG"]) != "")
                {
                    Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Request.QueryString["ORG"]));
                }
                else
                {
                    Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", "-1");
                }
                if (Convert.ToString(Request.QueryString["BU"]) != "")
                {
                    BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"]));
                }
                else
                {
                    BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1");
                }
                if (Convert.ToString(Request.QueryString["sts"]) != "")
                {
                    Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", Convert.ToString(Request.QueryString["sts"]));
                }
                else
                {
                    Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", "-1");
                }
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Period, PeriodElement, Status };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_CmprsnRptWithPrevMnth.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "CmprsnRptWithPrevMnthReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                RPT_Leavebalancesnew.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_Leavebalancesnew.ServerReport;

                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                Microsoft.Reporting.WebForms.ReportParameter Employee;
                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter PeriodElement;
                Microsoft.Reporting.WebForms.ReportParameter Status;

                string    sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                WebClient Wc      = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                serverReport.ReportPath = MyReportPath + "RptLeaveBalances";
                if (Convert.ToString(Request.QueryString["BU"]) != "")
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"]));
                }
                else
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1");
                }
                if (Convert.ToString(Request.QueryString["PRD"]) != "")
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"]));
                }
                else
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1");
                }
                if (Convert.ToString(Request.QueryString["EMP"]) != "")
                {
                    Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(Request.QueryString["EMP"]));
                }
                else
                {
                    Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1");
                }

                if (Convert.ToString(Request.QueryString["PRDDTL"]) != "")
                {
                    PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PRDDTL"]));
                }
                else
                {
                    PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1");
                }


                Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));


                if (Convert.ToString(Request.QueryString["sts"]) != "")
                {
                    Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", Convert.ToString(Request.QueryString["sts"]));
                }
                else
                {
                    Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", "-1");
                }
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Period, Employee, PeriodElement, Organisation, Status };
                ///  Microsoft.Reporting.WebForms.ReportParameter[] parameters = {Employee,Organisation };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_Leavebalancesnew.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "LeaveBalancesReportNew", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                RPT_Ec.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_Ec.ServerReport;

                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                //Microsoft.Reporting.WebForms.ReportParameter Department;
                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter PeriodElement;
                Microsoft.Reporting.WebForms.ReportParameter Employee;
                ///////  Microsoft.Reporting.WebForms.ReportParameter Status;

                string    sDomain      = ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                string    MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                WebClient wc           = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);

                if (Convert.ToString(Session["frm"]) == "edu")
                {
                    serverReport.ReportPath = MyReportPath + "EducationClaimBalanceReport";
                }
                else
                {
                    serverReport.ReportPath = MyReportPath + "MedicalClaimReport";
                }

                if (Convert.ToString(Request.QueryString["BU"]) != "")
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("EMPBUSINESSUNITID", Convert.ToString(Request.QueryString["BU"]));
                }
                else
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("EMPBUSINESSUNITID", "-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["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["Emp"]) != "")
                {
                    Employee = new Microsoft.Reporting.WebForms.ReportParameter("EMPID", Convert.ToString(Request.QueryString["Emp"]));
                }
                else
                {
                    Employee = new Microsoft.Reporting.WebForms.ReportParameter("EMPID", "-1");
                }


                if (Convert.ToString(Request.QueryString["PRD"]) != "")
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("EDUPERIODID", Convert.ToString(Request.QueryString["PRD"]));
                }
                else
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("EDUPERIODID", "-1");
                }
                if (Convert.ToString(Request.QueryString["PRDDTL"]) != "")
                {
                    PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PRDDTLID", Convert.ToString(Request.QueryString["PRDDTL"]));
                }
                else
                {
                    PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PRDDTLID", "-1");
                }
                //Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Employee, Period, PeriodElement };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_Ec.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "SpouseReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                rv_PFcontribution.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = rv_PFcontribution.ServerReport;
                Microsoft.Reporting.WebForms.ReportParameter BusinessUnit;
                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                //Microsoft.Reporting.WebForms.ReportParameter Department;
                Microsoft.Reporting.WebForms.ReportParameter PeriodElement;
                string    sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                WebClient Wc      = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                serverReport.ReportPath = MyReportPath + "PROVIDENTFUND_CONTRIBUTION";
                if (Convert.ToString(Request.QueryString["PRD"]) != "")
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", Convert.ToString(Request.QueryString["PRD"]));
                }
                else
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("Period", "-1");
                }
                if (Convert.ToString(Request.QueryString["PERIODELEMENT"]) != "")
                {
                    PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", Convert.ToString(Request.QueryString["PERIODELEMENT"]));
                }
                else
                {
                    PeriodElement = new Microsoft.Reporting.WebForms.ReportParameter("PeriodElement", "-1");
                }

                if (Convert.ToString(Request.QueryString["BU"]) != "")
                {
                    BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"]));
                }
                else
                {
                    BusinessUnit = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1");
                }
                //if (Convert.ToString(Request.QueryString["DEPT"]) != "")
                //{
                //    Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEPT"]));
                //}
                //else
                //{
                //    Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1");
                //}

                Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Period, PeriodElement, BusinessUnit, Organisation };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                rv_PFcontribution.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "PF_contributionReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 14
0
 protected void btn_Submit_Click(object sender, EventArgs e)
 {
     try
     {
         RPT_ExpenseReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
         Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
         serverReport = RPT_ExpenseReport.ServerReport;
         string    sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"];
         WebClient Wc      = new WebClient();
         Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
         serverReport.ReportServerCredentials = _ObjNC;
         serverReport.ReportServerUrl         = new Uri(sDomain);
         serverReport.ReportPath = "/SmartHR/" + "Employee Expense Report";
         Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
         Microsoft.Reporting.WebForms.ReportParameter Employee;
         Microsoft.Reporting.WebForms.ReportParameter StartDate;
         Microsoft.Reporting.WebForms.ReportParameter EndDate;
         Microsoft.Reporting.WebForms.ReportParameter Includedates;
         Microsoft.Reporting.WebForms.ReportParameter Organisation;
         Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
         if (ddl_BusinessUnit.SelectedIndex != 0)
         {
             BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", ddl_BusinessUnit.SelectedValue);
         }
         else
         {
             BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1");
         }
         if (ddl_Employee.SelectedIndex != 0)
         {
             Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", Convert.ToString(ddl_Employee.SelectedValue));
         }
         else
         {
             Employee = new Microsoft.Reporting.WebForms.ReportParameter("Employee", "-1");
         }
         if ((txt_StartDate.SelectedDate != null) && (txt_EndDate.SelectedDate != null))
         {
             Includedates = new Microsoft.Reporting.WebForms.ReportParameter("Includedates", "YES");
             StartDate    = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", txt_StartDate.SelectedDate.Value.ToShortDateString());
             EndDate      = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", txt_EndDate.SelectedDate.Value.ToShortDateString());
             Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Employee, Includedates, StartDate, EndDate };
             serverReport.SetParameters(parameters);
             serverReport.Refresh();
             RPT_ExpenseReport.Visible = true;
         }
         if ((txt_StartDate.SelectedDate != null) && (txt_EndDate.SelectedDate == null))
         {
             Includedates = new Microsoft.Reporting.WebForms.ReportParameter("Includedates", "YES");
             StartDate    = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", txt_StartDate.SelectedDate.Value.ToShortDateString());
             EndDate      = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", DateTime.Now.ToShortDateString());
             Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Employee, Includedates, StartDate, EndDate };
             serverReport.SetParameters(parameters);
             serverReport.Refresh();
             RPT_ExpenseReport.Visible = true;
         }
         else
         {
             Includedates = new Microsoft.Reporting.WebForms.ReportParameter("INCLUDEDATES", "NO");
             Microsoft.Reporting.WebForms.ReportParameter[] parameters = { BusinessGroup, Employee, Includedates };
             serverReport.SetParameters(parameters);
             serverReport.Refresh();
             RPT_ExpenseReport.Visible = true;
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Expense_Report", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
Esempio n. 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                rv_payslip.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = rv_payslip.ServerReport;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter Department;
                Microsoft.Reporting.WebForms.ReportParameter Employee;
                string    sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                WebClient Wc      = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                serverReport.ReportPath = MyReportPath + "Pay_Slip";
                if (Convert.ToString(Request.QueryString["PRD"]) != "")
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("PERIOD", Convert.ToString(Request.QueryString["PRD"]));
                }
                else
                {
                    Period = new Microsoft.Reporting.WebForms.ReportParameter("PERIOD", "-1");
                }
                if (Convert.ToString(Request.QueryString["EMP"]) != "")
                {
                    Employee = new Microsoft.Reporting.WebForms.ReportParameter("EMPLOYEE", Convert.ToString(Request.QueryString["EMP"]));
                }
                else
                {
                    Employee = new Microsoft.Reporting.WebForms.ReportParameter("EMPLOYEE", "-1");
                }

                if (Convert.ToString(Request.QueryString["BU"]) != "")
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BUSINESSUNIT", Convert.ToString(Request.QueryString["BU"]));
                }
                else
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BUSINESSUNIT", "-1");
                }
                if (Convert.ToString(Request.QueryString["DEPT"]) != "")
                {
                    Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEPT"]));
                }
                else
                {
                    Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1");
                }

                Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organization", Convert.ToString(Session["ORG_ID"]));
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Period, Employee, BusinessGroup, Department, Organisation };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                rv_payslip.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Employee_PaySlipReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                RPT_Cecd.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_Cecd.ServerReport;

                Microsoft.Reporting.WebForms.ReportParameter ORGANISATION;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                //Microsoft.Reporting.WebForms.ReportParameter Department;
                Microsoft.Reporting.WebForms.ReportParameter Employee;
                Microsoft.Reporting.WebForms.ReportParameter Status;

                string    sDomain      = ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                string    MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                WebClient wc           = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                serverReport.ReportPath = MyReportPath + "RptCurrentEmployeeContract";


                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");
                }
                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");
                }

                ///  Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));
                if (Convert.ToString(Request.QueryString["sts"]) != "")
                {
                    Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", Convert.ToString(Request.QueryString["sts"]));
                }
                else
                {
                    Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", "-1");
                }
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { ORGANISATION, BusinessGroup, Employee, Status };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_Cecd.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "CurrentEmpContractdetailsReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_Nhif.ServerReport;
                Microsoft.Reporting.WebForms.ReportParameter BusinessUnit;
                Microsoft.Reporting.WebForms.ReportParameter Period;
                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter Department;
                Microsoft.Reporting.WebForms.ReportParameter Directorate;
                Microsoft.Reporting.WebForms.ReportParameter PeriodDetail;
                Microsoft.Reporting.WebForms.ReportParameter SubDepartment;
                Microsoft.Reporting.WebForms.ReportParameter Status;


                string    sDomain = System.Configuration.ConfigurationSettings.AppSettings["MyReportViewerDomain"];
                WebClient Wc      = new WebClient();
                Reports.ReportServerNetworkCredentials _ObjNC = new Reports.ReportServerNetworkCredentials();
                serverReport.ReportServerCredentials = _ObjNC;
                serverReport.ReportServerUrl         = new Uri(sDomain);
                string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                serverReport.ReportPath = MyReportPath + "NHIF Report"; //"NHIF_Report11";

                if (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 (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 (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 (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 (Request.QueryString["PE"] != "")
                {
                    PeriodDetail = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetail", Convert.ToString(Request.QueryString["PE"]));
                }
                else
                {
                    PeriodDetail = new Microsoft.Reporting.WebForms.ReportParameter("PeriodDetail", "-1");
                }

                if (Convert.ToString(Request.QueryString["Sts"]) != "")
                {
                    Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", Convert.ToString(Request.QueryString["Sts"]));
                }
                else
                {
                    Status = new Microsoft.Reporting.WebForms.ReportParameter("Status", "-1");
                }

                Organisation = new Microsoft.Reporting.WebForms.ReportParameter("Organisation", Convert.ToString(Session["ORG_ID"]));

                SubDepartment = new Microsoft.Reporting.WebForms.ReportParameter("SubDepartment", "-1");

                //Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, Period, BusinessUnit, Department };
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, Directorate, Department, SubDepartment, Period, PeriodDetail, Status };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_Nhif.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Nhif_report", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                RPT_AppraisalDoneReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_AppraisalDoneReport.ServerReport;

                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                Microsoft.Reporting.WebForms.ReportParameter BusinessUnit;
                Microsoft.Reporting.WebForms.ReportParameter AppraisalCycle;
                Microsoft.Reporting.WebForms.ReportParameter RptMgr;


                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 + "Appraisal Done";
                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["RptMgr"]) != "")
                {
                    RptMgr = new Microsoft.Reporting.WebForms.ReportParameter("RptMgr", Convert.ToString(Request.QueryString["RptMgr"]));
                }
                else
                {
                    RptMgr = new Microsoft.Reporting.WebForms.ReportParameter("RptMgr", "-1");
                }
                Microsoft.Reporting.WebForms.ReportParameter[] parameters = { Organisation, BusinessUnit, AppraisalCycle, RptMgr };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_AppraisalDoneReport.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Pms_AppraisalDoneReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                RPT_PayRoll.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_PayRoll.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 Report_Name  = string.Empty;
                string MyReportPath = System.Configuration.ConfigurationSettings.AppSettings["MyReportPath"];
                if (Convert.ToString(Request.QueryString["Localisation"]).ToUpper() == "KENYA")
                {
                    Report_Name = "PayRollSummary_Kenya";
                }
                else
                {
                    Report_Name = "PayRollSummary";
                }
                serverReport.ReportPath = MyReportPath + Report_Name;
                //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 };
                serverReport.SetParameters(parameters);
                serverReport.Refresh();
                RPT_PayRoll.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "PayrollSummaryReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Esempio n. 20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                RPT_ResignationReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
                Microsoft.Reporting.WebForms.ServerReport serverReport = default(Microsoft.Reporting.WebForms.ServerReport);
                serverReport = RPT_ResignationReport.ServerReport;
                Microsoft.Reporting.WebForms.ReportParameter BusinessGroup;
                //Microsoft.Reporting.WebForms.ReportParameter StartDate;
                //Microsoft.Reporting.WebForms.ReportParameter EndDate;
                Microsoft.Reporting.WebForms.ReportParameter Organisation;
                //Microsoft.Reporting.WebForms.ReportParameter Department;
                Microsoft.Reporting.WebForms.ReportParameter StartDate;
                Microsoft.Reporting.WebForms.ReportParameter EndDate;
                Microsoft.Reporting.WebForms.ReportParameter Checked;
                //Microsoft.Reporting.WebForms.ReportParameter Period;

                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 + "ResignedEmployees";
                //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"]) != "")
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", Convert.ToString(Request.QueryString["BU"]));
                }
                else
                {
                    BusinessGroup = new Microsoft.Reporting.WebForms.ReportParameter("BusinessUnit", "-1");
                }
                //if (Convert.ToString(Request.QueryString["DEPT"]) != "")
                //{
                //    Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", Convert.ToString(Request.QueryString["DEPT"]));
                //}
                //else
                //{
                //    Department = new Microsoft.Reporting.WebForms.ReportParameter("Department", "-1");
                //}
                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
                {
                    StartDate = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", "01/01/2010");
                    Checked   = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", Convert.ToString(0));
                }
                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
                {
                    EndDate = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", "01/01/2010");
                    Checked = new Microsoft.Reporting.WebForms.ReportParameter("IncludeDate", Convert.ToString(0));
                }
                //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["PRD"]) != "")
                //{
                //    StartDate = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", Convert.ToString(Request.QueryString["PRD"]));
                //}
                //else
                //{
                //    StartDate = new Microsoft.Reporting.WebForms.ReportParameter("StartDate", "-1");
                //}
                //if (Convert.ToString(Request.QueryString["PRD1"]) != "")
                //{
                //    EndDate = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", Convert.ToString(Request.QueryString["PRD"]));
                //}
                //else
                //{
                //    EndDate = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", "-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_ResignationReport.Visible = true;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "ResignationReport", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }