title: displaying a crystal report using c#
body: <p>I am relatively new to C# and i have never used Crystal Reports so i apologise if i do use the incorrect terminology. I am trying to display a report which is called by some C# code. By following a lot of threads on here, i have managed to come up with the following code which does build an debug. However, when the code is run, it does not display the report. </p>
  
  <p>Here is the code:</p>
  
  <pre><code>private void forAllQualitiesToolStripMenuItem_Click(object sender, EventArgs e) {
      CrystalReportViewer rv = new CrystalReportViewer();
      string reportPath = @"C:\Documents and Settings\rp\Desktop\StockByStatus.rpt"; 
  
      ReportDocument r = new ReportDocument();
  
      r.Load(reportPath);
      rv.Visible = false; // i put this in because when i ran the code without it, it said the report must not be visible and the program would fall down
      rv.ReportSource = r;
      rv.InitReportViewer();
      ShowDialog(rv);
  }
  </code></pre>