Пример #1
0
    void LoadDataBind()
    {
        string id = Request.QueryString["id"].ToString();//客户编号

        string CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

        DataTable dt = ServiceBus.PrintService(CompanyCD, id);

        if (dt != null)
        {
            rd.Load(Server.MapPath(@"~/PrinttingModel/CustManager/ServicePrint.rpt"));
            CrystalReportViewer1.LogOnInfo.Add(ReportUtil.GetTableLogOnInfo("officedba.CustLinkMan"));
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //绑定数据
            rd.SetDataSource(dt);
            rd.Refresh();
            this.CrystalReportViewer1.ReportSource = rd;
            rd.SetParameterValue("Today", "制表人:" + userInfo.EmployeeName);
        }
    }