title: Crystal Report in ASP.Net passing parameter values and no valid report source
body: <p>I having trouble displaying a Crystal report on a ASP.Net web page. The website is an internal website only so you'll see that I have file path coded into the site. I think I'm very close the getting this to work, but I'm obviously missing something. Can anyone help?</p>
  
  <p>He is my code:</p>
  
  <pre><code>void BindReport()
  {
      ReportDocument rd = new ReportDocument();
  
      //Report is saved on an external server which I have full access too
      rd.Load(@"\\MyServer\Reports\MyReport.rpt");
      rd.SetDatabaseLogon("UserName", "Password", "MyServer", "MyDatabase", true);
      //The Report has 2 parameter and links directly to a stored procedure on a SQL Server
      rd.SetParameterValue("@uspDateFrom", new DateTime(2012, 05, 01));
      rd.SetParameterValue("@uspDateTo", new DateTime(2012, 05, 31));
      CrystalReportViewer1.ReportSource = rd;
      CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;
      CrystalReportViewer1.RefreshReport();
  }
  
  //I call my report on a button click
  protected void buttonPreviewReport_Click(object sender, EventArgs e)
  {
      BindReport();
  }
  </code></pre>
  
  <p>When the report tries to run I get a dialog box pop up asking for my parameter values even though I've already passed them in!? and even if I enter them on the dialog prompt I then receive a message saying that no valid report source is available.</p>
  
  <p>Anybody got any ideas?</p>
  
  <p>I'm using ASP.Net 4.0</p>
  
  <p>Thanks in advance</p>