title: Adding multiple dataset from codebehind to .rdlc report
body: <p>I have a report in VS2008 with a table and 10 text boxes.I have bound values to table from DB-table sucesfully.But how to bind the text boxes with a different DB-table in the same report? How to bind multiple data sets in same code-behind at a time ? what if am using more than one query to get data for a single report? sample code i did is below here- its to bind data to table in the .rdlc.`</p>
  
  <p>// A table mapping names the DataTable.</p>
  
  <pre><code>            adapter.TableMappings.Add("View", mappingTableDataSet);
  
              // Open the connection.
              connection.Open();
              Console.WriteLine("\nThe SqlConnection is open.");
  
              SqlCommand command = new SqlCommand(queryString, connection);
              command.CommandType = CommandType.Text;
  
              // Set the SqlDataAdapter's SelectCommand.
              adapter.SelectCommand = command;
              command.ExecuteNonQuery();
  
              // Fill the DataSet.
              DataSet dataset = new DataSet(mappingTableDataSet);
              adapter.Fill(dataset);
  
              //Set up reportviewver and specify path
              ReportViewer viewer = new ReportViewer();
              viewer.ProcessingMode = ProcessingMode.Local;
              viewer.LocalReport.ReportPath = reportPath;
  
              //specify the dataset syntax = (datasetofreport.rdlc,querydataset); 
              viewer.LocalReport.DataSources.Add(new ReportDataSource(reportDataSource, dataset.Tables[0]));
              //viewer.LocalReport.DataSources.Add(new ReportDataSource("podDataSet_Route_Summary", dataset.Tables[0]));
              connection.Close();`
  </code></pre>