title: Convert Data Grid View to Report Viewer
body: <p>Gentleman,</p>
  
  <p>I read over 30 search entries (and tried them all), most of which did not have reply's, before I constructed this question.  Although this is the first time I have ever asked a question here, this has been my favorite place to get answers for over 10 years. And so here goes...I created the following code to accept data from my dataset on another page and propagate it in a report viewer.</p>
  
  <pre><code>    //Creates the Grid View
          dataGridViewReport.DataSource = null;            
          dataGridViewReport.DataSource = ds.Tables[0].DefaultView;
  
          //Creates the Report
          reportViewer1.LocalReport.DataSources.Clear();
          this.reportViewer1.LocalReport.ReportPath = Application.StartupPath + @" \Report1.rdlc";// @"C:\Users\Pat\Documents\Visual Studio 2010\Projects\TTW 151200\TTW\Report1.rdlc";
          DataTable dt = ds.Tables[0];
          dt.TableName = "DataSet1";
          ReportDataSource rds = new ReportDataSource("DataSet1", dataGridViewReport.DataSource);
          reportViewer1.LocalReport.DataSources.Add(rds);            
          reportViewer1.RefreshReport();
  </code></pre>
  
  <p>When the page loads, this page accepts the dataset value from the constructor and uses it in the code above. This has been an ordeal up until now, but I think this might be close. I think the problem might be that the report file cannot be found, although it is no longer throwing that error. Now, when I created the report file (Report1.rdlc), it appears with the other form files. What I thought I read is that this would then be located, on RUNTIME, in the /bin OR /release folder, but it does not appear to be there, nor can I copy it to that location. I cannot find where the actual path is, only the path while it is not running. So ... first, I am not sure if I have the code correct to create the report but it is no longer throwing any errors. The view display simply says that it cannot locate this file. And second, just where should I be pointing at so that this code (or any code) has the correct path to the file so the report can be created. Finally, I don't understand the arguments that require the dataset name, so I simply copied from some examples that I found of code that supposedly worked.  I changed the Build Action to Embedded Resource and also the Copy the Copy To Output to Copy Always in the properties table (although it never worked for me).  Please help. A simple, clear code snippet would go a long way to helping me regain my sanity! Thank You!</p>