public void bindReport()
    {
        try
        {
            string name = "";
            try
            {
                usersTableAdapters.GetUserNameTableAdapter user = new usersTableAdapters.GetUserNameTableAdapter();
                users.GetUserNameDataTable tblUser = user.GetUserName(MySessionManager.CurrentUser.UserID);
                name = tblUser[0].name.ToString();
            }
            catch (Exception ex) { }

            this.rvScheduledPayment.Visible = true;
            // fetch the en-GB culture
            CultureInfo ukCulture = new CultureInfo("en-GB");
            // pass the DateTimeFormat information to DateTime.Parse
            DateTime FromDT = DateTime.Parse(txtFromDT.Text, ukCulture.DateTimeFormat);
            DateTime ToDT   = DateTime.Parse(txtToDT.Text, ukCulture.DateTimeFormat);

            this.ObjectDataSource1.SelectParameters["BranchID"].DefaultValue  = ddlBranch.SelectedValue;
            this.ObjectDataSource1.SelectParameters["CMID"].DefaultValue      = ddlct.SelectedValue;
            this.ObjectDataSource1.SelectParameters["startDate"].DefaultValue = FromDT.ToShortDateString();
            this.ObjectDataSource1.SelectParameters["endDate"].DefaultValue   = ToDT.ToShortDateString();
            ReportParameter rp1 = new ReportParameter("Report_Date", DateTime.Now.ToString("dd-MM-yyyy"));
            ReportParameter rp3 = new ReportParameter("fromDate", txtFromDT.Text);
            ReportParameter rp4 = new ReportParameter("toDate", txtToDT.Text);
            ReportParameter rp2 = new ReportParameter("Report_Generator", name);
            rvScheduledPayment.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4 });
            rvScheduledPayment.DataBind();
            rvScheduledPayment.LocalReport.Refresh();
        }
        catch (Exception ex) { }
    }
Пример #2
0
    public void bindReport()
    {
        try
        {
            string name = "";
            try
            {
                usersTableAdapters.GetUserNameTableAdapter user = new usersTableAdapters.GetUserNameTableAdapter();
                users.GetUserNameDataTable tblUser = user.GetUserName(MySessionManager.CurrentUser.UserID);
                name = tblUser[0].name.ToString();
            }
            catch (Exception ex) { }

            this.rvLargestExposure.Visible = true;
            this.ObjectDataSource1.SelectParameters["category"].DefaultValue = ddlCategory.SelectedValue;
            this.ObjectDataSource1.SelectParameters["CMID"].DefaultValue     = ddlct.SelectedValue;
            this.ObjectDataSource1.SelectParameters["BranchID"].DefaultValue = ddlBranch.SelectedValue;
            this.ObjectDataSource1.SelectParameters["Type"].DefaultValue     = ddlPerformance.SelectedValue;
            this.ObjectDataSource1.SelectParameters["top"].DefaultValue      = txtTop.Text;

            ReportParameter rp1 = new ReportParameter("Report_Date", DateTime.Now.ToString("dd-MM-yyyy"));
            ReportParameter rp3 = new ReportParameter("Report_top", txtTop.Text);
            ReportParameter rp2 = new ReportParameter("Report_Generator", name);
            rvLargestExposure.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });
            this.rvLargestExposure.DataBind();
            this.rvLargestExposure.LocalReport.Refresh();
        }
        catch (Exception ex) { }
    }
    public void bindReport()
    {
        try
        {
            this.rvAging.Visible = true;
            // fetch the en-GB culture
            CultureInfo ukCulture = new CultureInfo("en-GB");
            // pass the DateTimeFormat information to DateTime.Parse
            DateTime fromDT = DateTime.Parse(txtDate.Text, ukCulture.DateTimeFormat);
            string   dt     = fromDT.ToShortDateString();
            // ShowMessageBox(dt);
            string name = "";
            try
            {
                usersTableAdapters.GetUserNameTableAdapter user = new usersTableAdapters.GetUserNameTableAdapter();
                users.GetUserNameDataTable tblUser = user.GetUserName(MySessionManager.CurrentUser.UserID);
                name = tblUser[0].name.ToString();
            }
            catch (Exception ex) { }

            this.ObjectDataSource1.SelectParameters["date"].DefaultValue     = dt;
            this.ObjectDataSource1.SelectParameters["category"].DefaultValue = ddlCategory.SelectedValue.ToString();
            this.ObjectDataSource1.SelectParameters["Type"].DefaultValue     = ddlPerformance.SelectedValue.ToString();
            this.ObjectDataSource1.SelectParameters["BranchID"].DefaultValue = ddlBranch.SelectedValue.ToString();
            this.ObjectDataSource1.SelectParameters["CMID"].DefaultValue     = ddlct.SelectedValue.ToString();

            ReportParameter rp1 = new ReportParameter("Report_Date", DateTime.Now.ToString("dd-MM-yyyy"));
            ReportParameter rp3 = new ReportParameter("date", txtDate.Text);
            ReportParameter rp2 = new ReportParameter("Report_Generator", name);
            rvAging.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });
            rvAging.DataBind();
            this.rvAging.LocalReport.Refresh();
        }
        catch (Exception ex) { }
    }
    private void bindReport()
    {
        try
        {
            string name = "";
            try
            {
                usersTableAdapters.GetUserNameTableAdapter user = new usersTableAdapters.GetUserNameTableAdapter();
                users.GetUserNameDataTable tblUser = user.GetUserName(MySessionManager.CurrentUser.UserID);
                name = tblUser[0].name.ToString();
            }
            catch (Exception ex) { }


            this.rvPortfolioSummary.Visible = true;
            // fetch the en-GB culture
            CultureInfo ukCulture = new CultureInfo("en-GB");
            // pass the DateTimeFormat information to DateTime.Parse
            DateTime dt = DateTime.Parse(txtDate.Text, ukCulture.DateTimeFormat);


            this.ObjectDataSource1.SelectParameters["BranchID"].DefaultValue = ddlBranch.SelectedValue;
            this.ObjectDataSource1.SelectParameters["CMID"].DefaultValue     = ddlct.SelectedValue;
            this.ObjectDataSource1.SelectParameters["date"].DefaultValue     = dt.ToShortDateString();

            ReportParameter rp1 = new ReportParameter("Report_Date", DateTime.Now.ToString("dd-MM-yyyy"));
            ReportParameter rp3 = new ReportParameter("date", txtDate.Text);
            ReportParameter rp2 = new ReportParameter("Report_Generator", name);
            rvPortfolioSummary.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });
            this.rvPortfolioSummary.DataBind();
            this.rvPortfolioSummary.LocalReport.Refresh();
        }
        catch (Exception ex) { }
        //throw new NotImplementedException();
    }
Пример #5
0
    protected void btnViewReport_Click(object sender, EventArgs e)
    {
        try
        {
            this.rvClientMovement.Visible = true;
            // fetch the en-GB culture
            CultureInfo ukCulture = new CultureInfo("en-GB");
            // pass the DateTimeFormat information to DateTime.Parse
            DateTime fromDT = DateTime.Parse(txtFromDT.Text, ukCulture.DateTimeFormat);
            DateTime toDT   = DateTime.Parse(txtToDT.Text, ukCulture.DateTimeFormat);
            string   name   = "";
            try
            {
                usersTableAdapters.GetUserNameTableAdapter user = new usersTableAdapters.GetUserNameTableAdapter();
                users.GetUserNameDataTable tblUser = user.GetUserName(MySessionManager.CurrentUser.UserID);
                name = tblUser[0].name.ToString();
            }
            catch (Exception ex) { }

            this.ObjectDataSource1.SelectParameters["FromDT"].DefaultValue   = fromDT.ToShortDateString();
            this.ObjectDataSource1.SelectParameters["ToDT"].DefaultValue     = toDT.ToShortDateString();
            this.ObjectDataSource1.SelectParameters["BranchID"].DefaultValue = ddlBranch.SelectedValue.ToString();
            this.ObjectDataSource1.SelectParameters["CMID"].DefaultValue     = ddlct.SelectedValue.ToString();

            ReportParameter rp1 = new ReportParameter("Report_Date", DateTime.Now.ToString("dd-MM-yyyy"));
            ReportParameter rp2 = new ReportParameter("Report_Generator", name);
            rvClientMovement.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2 });
            rvClientMovement.DataBind();
            this.rvClientMovement.LocalReport.Refresh();
        }
        catch (Exception ex) { }
    }