title: where i passed the follow int s to show my report.... coz it give me error Sp_Invoice_Detail' expects parameter '@SaleID', which was not supplied
body: <p>my code </p>
  
  <pre><code>SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-C8H8UQI\SQLEXPRESS;Initial Catalog=IMSDatabase;Integrated Security=True");
  ReportDocument rprt = new ReportDocument();
  
  SqlCommand cmd = new SqlCommand("Sp_Invoice_Detail", con);
  cmd.CommandType = CommandType.StoredProcedure;
  SqlDataAdapter sda = new SqlDataAdapter(cmd);
  DataSet ds = new DataSet();
  sda.Fill(ds, "item,invoice,sale");
  rprt.Load(@"C:\Users\Zia Khan\Documents\Visual Studio 2015\Projects\lol\lol\Report\finalreport.rpt");
  
          rprt.SetDataSource(ds);
          crystalReportViewer1.ReportSource = rprt;
  </code></pre>
  
  <p>this query is used to grab the last sale id from sale table</p>
  
  <pre><code>string query4 = "select isnull(max(cast(SaleID as int)), 0) +0 from sale";
              SqlDataAdapter sda4 = new SqlDataAdapter(query4, con);
              DataTable dt4 = new DataTable();
              sda4.Fill(dt4);
              int s = Convert.ToInt32(dt4.Rows[0][0]);
  </code></pre>
  
  <p>while store procedure is </p>
  
  <pre><code>Create Proc Sp_Invoice_Detail
  
      @SaleID int
      as 
      begin
      Select Item.Barcode , Item.ItemName as item, Item.SalePrice as price, invoice.Qty, invoice.Disc FROM invoice JOIN item ON invoice.ItemID = item.ItemID where SaleID=@SaleID;
  </code></pre>
  
  <p>end</p>