title: Passing multiple parameters to Crystal Report
body: <p>I'm working on Visual Studio 2008 and SQL Server 2008, language C#</p>
  
  <p>I want to pass multiple parameters to Crystal Report in ASP.NET. I have two parameters <code>@accountnumber</code> and <code>@customerid</code>. But I can only pass one parameter to my report as in code below.</p>
  
  <pre><code>CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.ServerName = "CJ-PC";
  CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.UserID = "sa";
  CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.Password = "***";
  CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.DatabaseName = "Online";
  
  string accountnumber = "acc001";
  string customerID = "cus001";
  
  ParameterField paramField = new ParameterField();
  ParameterFields paramFields = new ParameterFields();
  ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
  
  paramField.Name = "@account_number";
  paramDiscreteValue.Value = accountnumber;
  paramField.CurrentValues.Add(paramDiscreteValue);
  paramFields.Add(paramField);
  CrystalReportViewer1.ParameterFieldInfo = paramFields;
  
  ParameterField paramField1 = new ParameterField();
  ParameterFields paramFields1 = new ParameterFields();
  ParameterDiscreteValue paramDiscreteValue1 = new ParameterDiscreteValue();
  
  paramField1.Name = "@account_number";
  paramDiscreteValue1.Value = accountnumber;
  paramField1.CurrentValues.Add(paramDiscreteValue1);
  paramFields1.Add(paramField1);
  
  paramField1.Name = "@customer_id";
  paramDiscreteValue1.Value = customerID;
  paramField1.CurrentValues.Add(paramDiscreteValue1);
  paramFields1.Add(paramField1);
  CrystalReportViewer1.ParameterFieldInfo = paramFields1;
  </code></pre>