zoukankan      html  css  js  c++  java
  • 水晶报表

     protected ReportDocument reportDocument1 = new ReportDocument();//用  protected ReportDocument reportDocument1,没有实例化 出错
        protected void Page_Load(object sender, EventArgs e)
        {
            string credit_id = Request.QueryString["credit_id"].ToString().Trim();
            Bll_Material_Buy_Credit bll_material_buy_credit = new Bll_Material_Buy_Credit();
            DataTable table_material_buy_credit = bll_material_buy_credit.Get_DataSet_Material_Buy_Credit_By_Credit_id(credit_id);
            DataColumn col = new DataColumn("material_name", typeof(string));
            table_material_buy_credit.Columns.Add(col);

            //通过ID查名称
            IList<Material_Info_Info> param_material_info = Bll_Get_Name_By_Id.All_Material_Info();
            IList<Service_Company_Info> param_service_company_info = Bll_Get_Name_By_Id.All_Service_Company();
            IList<Lis_Base_Data_Info> param_lis_base_data_info = Bll_Get_Name_By_Id.All_Lis_Base_Data();
            IList<Deptment_Info_Info> param_deptment_info = Bll_Get_Name_By_Id.All_Deptment_Info();

            for (int i = 0; i < table_material_buy_credit.Rows.Count; i++)
            {
                table_material_buy_credit.Rows[i]["material_name"] = Bll_Get_Name_By_Id.Get_Material_Info_Name_By_Id(table_material_buy_credit.Rows[i]["material_id"].ToString().Trim(), param_material_info);
               
                table_material_buy_credit.Rows[i]["deptment_id"] = Bll_Get_Name_By_Id.Get_Deptment_Info_Name_By_Id(table_material_buy_credit.Rows[i]["deptment_id"].ToString().Trim(), param_deptment_info);

                table_material_buy_credit.Rows[i]["pack"] = Bll_Get_Name_By_Id.Get_Lis_Base_Data_Name_By_Id(table_material_buy_credit.Rows[i]["pack"].ToString().Trim(), param_lis_base_data_info);

                table_material_buy_credit.Rows[i]["buy_date"] = table_material_buy_credit.Rows[i]["buy_date"].ToString();
               
            }
            string path = Server.MapPath("~//reports//report_material_buy_credit.rpt");
            reportDocument1.Load(path);
            reportDocument1.SetDataSource(table_material_buy_credit);
            this.CrystalReportViewer1.ReportSource = reportDocument1;
            CrystalReportViewer1.DataBind();


        }

  • 相关阅读:
    SQL 语句优化中间表的使用优化
    SQL 语句优化OR 语句优化案例
    浅谈系统优化设计复杂运算放在逻辑层还是在数据库层?
    linux命令综合
    MySQL常用命令
    PHP知识点积累
    [Git] 生成token解决github remote: Support for password authentication was removed on August 13, 2021.
    [uniapp] GOFLY在线客服系统 uniapp增加播放背景音效或者按钮音效
    [Golang]gorm更新数据update 解决值为0时被忽略
    光阴真的是贱(似箭),一不小心就又过一年了
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090612.html
Copyright © 2011-2022 走看看