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

  • 相关阅读:
    接口和抽象类
    JNI
    Serializable Parcelable
    android keystore 生成以及作用
    svn 服务器搭建
    java 8种基本数据类型
    Android NDK
    android adb命令行
    对称加密AES和DES加密、解密
    .net中的数据库连接字符串
  • 原文地址:https://www.cnblogs.com/moss_tan_jun/p/1825346.html
Copyright © 2011-2022 走看看