title: how to pass another .rdlc report into reportviewer
body: <p>I have a web form with some  drop down list and textbox and three buttons. 1) generate report 2) print 3) Export to PDF </p>
  
  <p>I have printonebartest.rdlc as a default report binded to reportviewer1 which is designed for user to view the information correctly however when I print the same report the html messes up the layout so I created another report printonebartest1.rdlc which is scaled to print the information correctly my question is how can I pass printonebartest1.rdlc to reportviewer1 when the print button and export to pdf is clicked.  </p>
  
  <p>This is the code I have for the print button </p>
  
  <pre><code>  protected void Print_Click(object sender, ImageClickEventArgs e)
          {
              IolaNetWeightWeb.BarTableAdapters.Product_Weight_Data_Sheet_QueryTableAdapter ds = new IolaNetWeightWeb.BarTableAdapters.Product_Weight_Data_Sheet_QueryTableAdapter();
              ReportDataSource rds = new ReportDataSource("Bar_Product_Weight_Data_Sheet_Query", ds.GetData(DropDownList1.Text, DropDownList3.Text));
  
              // Variables
              Warning[] warnings;
              string[] streamIds;
              string mimeType = string.Empty;
              string encoding = string.Empty;
              string extension = string.Empty;
  
  
              // Setup the report viewer object and get the array of bytes
              ReportViewer viewer = new ReportViewer();
              viewer.ProcessingMode = ProcessingMode.Local;
              viewer.LocalReport.ReportPath = "printonebartest1.rdlc";
              viewer.LocalReport.DataSources.Add(rds); // Add datasource here
  
  
              byte[] bytes = ReportViewer1.LocalReport.Render("Pdf", null, out mimeType, out encoding, out extension, out streamIds, out warnings);
  
  
              // Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
              Response.Buffer = true;
              Response.Clear();
              Response.ContentType = mimeType;
              Response.AddHeader("content-disposition", "inline; filename=PrintOneBar.pdf");
              Response.BinaryWrite(bytes); // create the file
              Response.Flush(); // send it to the client to download
          }
  </code></pre>
  
  <p>even though I am passing printonebartest1.rdlc it still uses the printonebartest.rdlc am I doing something wrong here, do I have to rebind the datasource or something? please help any help is appreciated.</p>