设置报表,传递参数

来源:互联网 发布:淘宝店铺首页定时发布 编辑:程序博客网 时间:2024/05/03 05:52
            string sql = "select ids,roomid from room where ids = 2";            DataTable dt = dbutil.huoqu(sql);            ReportDataSource rds = new ReportDataSource("DataSet1", dt);            this.reportViewer1.LocalReport.DataSources.Clear();            this.reportViewer1.LocalReport.DataSources.Add(rds);            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("password", passwrod));            this.reportViewer1.LocalReport.Refresh();            this.reportViewer1.RefreshReport();

0 0
原创粉丝点击