ReportViewer 後台,代碼控制報表.

        private void button1_Click(object sender, EventArgs e)
        {
         
            ReportDataSource reportdatasource1 = new ReportDataSource();
            reportdatasource1.Name = "perDataSet1_per_Structure_View";
            reportdatasource1.Value = this.DataBlockSet.DataSource.Tables["baseDataBlock1"];
            this.reportViewer1.LocalReport.DataSources.Add(reportdatasource1);
            this.reportViewer1.LocalReport.ReportEmbeddedResource = "Lerado.Modules.Per.Forms.ReportView.Report3.rdlc";
            this.reportViewer1.RefreshReport();
        }

posted on 2010-07-21 18:49  Rolls  阅读(383)  评论(1编辑  收藏  举报

导航