title: Pass byte[] as Parameter to ReportViewer
body: <p>Hello I have got this line of code to load the image from Sql Database:</p>
  
  <pre><code>MemoryStream mem;
      void zobraz_logo()
      {
          try
          {
              SqlDataAdapter dataAdapter = new SqlDataAdapter(new SqlCommand("SELECT logo FROM firma WHERE id = 1", spojeni));
              DataSet dataSet = new DataSet();
  
  
              dataAdapter.Fill(dataSet);
  
  
              if (dataSet.Tables[0].Rows.Count == 1)
              {
                  Byte[] data = new Byte[0];
                  data = (Byte[])(dataSet.Tables[0].Rows[0]["logo"]);
                   mem = new MemoryStream(data);
  
              }
  
          }
  
          catch (Exception)
          {
              MessageBox.Show("");
          }
  
      }
  </code></pre>
  
  <p>Now I'm trying to pass it as parameter to ReportViewer:</p>
  
  <pre><code>eportParameter[] parameter = new ReportParameter[18];
  
              parameter[18] = new ReportParameter("rp_logo", Image.FromStream(mem)); // this is the issue line
  
  
              this.firmaTableAdapter.Fill(this.dataset_voucher.firma);
              this.zajezdTableAdapter.Fill(this.dataset_voucher.zajezd,vybrana_akce,klientClass.Rocnik());
  
  
              this.reportViewer1.LocalReport.SetParameters(parameter);
              this.reportViewer1.RefreshReport();
  
  
          }
  </code></pre>
  
  <p>I'm trying to load image as parameter to Image of the ReportViewer I hope it is possible do it this way. If not May you please propose me the best way to do that?</p>
  
  <p>On the mentioned line I'm receiving error: <code>Argument 2:cannot convert from System.Drawing.Image to String[]</code></p>
  
  <p>Thank you for your time.</p>