title: Unable to pass a int Parameter to a Crystal Report
body: <p>I have a simple Crystal Report with a single parameter, which should produce a single item on the report.   I have listed the code below, as well as the Parameter settings in the report.  When I try to print the report to the printer (The final line in the code snippet), I receive the following Exception;</p>
  
  <p>CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException was unhandled
    Message=Missing parameter values. </p>
  
  <p>I have also tried the report using the ParameterFieldDefinitions and ParameterFieldDefinition objects, but I end up with the same results.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <pre><code>        ReportDocument loReport = new ReportDocument();
  
          loReport.Load(path+"InventoryItemsBarCodeLabel.rpt");
  
          SqlConnectionStringBuilder loConnectionString = new SqlConnectionStringBuilder(ConnectionUtilities.getConnectionString());
  
          ParameterValues currentParameterValues = new ParameterValues();
          ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
          parameterDiscreteValue.Value = Convert.ToInt32(psMasterId);
  
          loReport.SetParameterValue("pnMasterId", parameterDiscreteValue.Value);
          loReport.SetDatabaseLogon(loConnectionString.UserID,
              loConnectionString.Password,
              loConnectionString.DataSource,
              loConnectionString.InitialCatalog);
          loReport.Refresh();
          loReport.PrintToPrinter(1, false, 1, 1);
  </code></pre>
  
  <p>Report Parameter: Name: pmMasterId, Type: Number, List of Values: Dynamic, Value = MasterId, Description = MasterId, Parameters = ?pnMasterId</p>
  
  <p>Report Selection Record: {Inventory_Items.MasterId} = {?pnMasterId}</p>