none
RDLC ,Two buttons select two different rdlcs in reportview of winform RRS feed

  • Question

  • There are two buttons and  two rdlcs , and I want to use button1 assign rdlc1 to show  and  use button2 assign rdlc2 to show ,But when I Select rdlc1 tag which is upper right corner of reportviewer , the rdlc2 cannot normally  display at reportviewer. when I select rdlc2 ..... the result is reverse. 

    How do I modify these following codes? Thanks in advance!

     private void button1_Click(object sender, EventArgs e)
     {
         this.reportViewer1.LocalReport.ReportPath =        @"F:\dbTest\dbTest\Report1.rdlc";
         this.USERTableAdapter.Fill(this.DataSet1.USER);
         this.reportViewer1.RefreshReport();
     }
    
     private void button2_Click(object sender, EventArgs e)
     {
         this.reportViewer1.LocalReport.ReportPath = @"F:\dbTest\dbTest\Report3.rdlc";
         this.LOGFTableAdapter.Fill(this.DataSet3.LOGF);
         this.reportViewer1.RefreshReport();
    }



    • Edited by yuanhaosh Friday, May 17, 2013 3:01 AM
    • Moved by Bob Shen Monday, May 20, 2013 5:00 AM
    Friday, May 17, 2013 2:58 AM

Answers

All replies