title: c# windows form ( i need to print form crystal report 1 user only )
body: <p>i am trying to print from crystal report but i am getting an error. here is pic of what i want to do <a href="https://i.stack.imgur.com/sGLKv.png" rel="nofollow noreferrer">pic </a>. the text box is for the users ID. when i type the id then press the button i want to print only that user information.
  this is my code </p>
  
  <pre><code>if (conect.State != ConnectionState.Open)
          {
              conect.Open();
          }
  
          string cs = "select * from Sign_Up where ID='"+textBox1.Text+"'";
          OleDbCommand command = new OleDbCommand(cs, conect);
          OleDbDataAdapter adap = new OleDbDataAdapter(command);
          DataSet ds = new DataSet();
  
          adap.Fill(ds, "Sign_Up");
  
          CrystalReport1 crs1 = new CrystalReport1();
          crs1.SetDataSource(ds.Tables["Sign_Up"]);
          crs1.SetDataSource(ds);
          crystalReportViewer1.ReportSource = crs1;
          conect.Close();
          crystalReportViewer1.Refresh();
  </code></pre>
  
  <p>and this is my error </p>
  
  <blockquote>
    <p>System.Data.OleDb.OleDbException: 'Data type mismatch in criteria expression.'</p>
  </blockquote>
  
  <p>at this code <code>adap.Fill(ds, "Sign_Up");</code></p>
  
  <p>anyone have any suggestions ? </p>