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

      

      private static string Conn = ConfigurationManager.AppSettings["Str_Conn_14"].ToString();
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!Page.IsPostBack)
            //{
            //    this.Report();
            //}
        }

        public void Report()
        {
            ReportDocument RpDoc = new ReportDocument();
            string path = Server.MapPath("CrystalReport12.rpt");
            RpDoc.Load(path);

            SqlConnection SqlConn = new SqlConnection(Conn);
            SqlDataAdapter dpt = new SqlDataAdapter(" select * from dbo.tb_19", SqlConn);
            DataSet ds = new DataSet();

            dpt.Fill(ds);

            RpDoc.SetDataSource(ds);
            this.CrystalReportViewer1.ReportSource = RpDoc;
            this.CrystalReportViewer1.DataBind();
           

        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            this.Report();
        }

  • 相关阅读:
    Memo
    list查询记录时页面变成空白
    get the mail ids of the group members
    ui action(server side) change column value
    catalog item 时间按照指定形式输出
    select box 联动
    lookup select box和select box 联动
    函数二--递归
    函数一
    指针3
  • 原文地址:https://www.cnblogs.com/moss_tan_jun/p/1825346.html
Copyright © 2011-2022 走看看