可以,在界面加载的时候做个判断,给你个示例:
public Form2(System.Data.DataTable dtData)
{
InitializeComponent();
if (this.comboBox1.Text == "月份")
{
this.reportViewer1.LocalReport.ReportPath = @"..\..\Report1.rdlc";
this.reportViewer1.LocalReport.DataSources.Clear();
this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dtData));
}
else if (this.comboBox1.Text == "星期"察桥改)
{
消虚 this.reportViewer1.LocalReport.ReportPath = @"..\..\Report2.rdlc";
this.reportViewer1.LocalReport.DataSources.Clear();
this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dtData));
}
败判 }
选择哪个选项,就显示哪个rdlc