当前位置: 首页 > 工具软件 > RDLC > 使用案例 >

RDLC基础代码

邬阳
2023-12-01

            reportViewer1.ProcessingMode = ProcessingMode.Local;
            reportViewer1.LocalReport.ReportPath = @"E:/WinForm/Report1.rdlc";
            reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1_DataTable1", myDataSet.DataTable1));

 

            // 给RDLC传参
            ReportParameter rp = new ReportParameter("Report_Parameter_0", "Hello World!!!");
            reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });


            reportViewer1.RefreshReport();

 

:)

 类似资料: