4,816
社区成员
发帖
与我相关
我的任务
分享
<DataSets>
<DataSet Name="ReportStatsSet"> 。。。 </DataSet>
</DataSets>
Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource();
//
// reportViewerMain
//
this.reportViewerMain.Dock = System.Windows.Forms.DockStyle.Fill;
reportDataSource1.Name = "ReportStatsSet"; // 就是刚才DataSet1的位置
reportDataSource1.Value = this.StatsAllViaTimeBindingSource;
this.reportViewerMain.LocalReport.DataSources.Add(reportDataSource1);
this.reportViewerMain.LocalReport.ReportEmbeddedResource = "StatTotal.Reports.StatsAllViaTime.rdlc";
this.reportViewerMain.Location = new System.Drawing.Point(0, 0);
this.reportViewerMain.Name = "reportViewerMain";
this.reportViewerMain.Size = new System.Drawing.Size(725, 546);
this.reportViewerMain.TabIndex = 0;