title: how to add parameters in report viewer?
body: <p>HY! I have a form application in visual studio 2010 and I want to create a report with report viewer and to add some parameters. I tried to add parameters from code but it didn`t work. I have this error:    </p>
  
  <p>FilterExpression expression for the tablix ‘Tablix1’ refers to the field ‘datastart’.  Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope.
  Report2.rdlc : error rsParameterReference: The FilterValue expression for the tablix ‘Tablix1’ refers to a non-existing report parameter ‘datastart’.  </p>
  
  <p>In my code a do this:</p>
  
  <pre><code> private void SetReportParameters()
      {
          ReportParameter[] parameters = new ReportParameter[2];
          parameters[0] = new ReportParameter("datastart", dateTimePickerStartRaport.Text);
          parameters[1] = new ReportParameter("dataStop", dateTimePickerStopRaport.Text);
          this.reportViewer1.LocalReport.SetParameters(parameters);
      }
  </code></pre>
  
  <p>and after calling this method a make a refresh on the report viewer</p>
  
  <pre><code> reportViewer1.RefreshReport();           
  </code></pre>
  
  <p>I also look at other forums and I saw that I have to add the parameters to the report, but  I didn`t manage out how must I do this. I also tried to add, in the properties windows of the report, some filters with value </p>
  
  <pre><code>  =Parameters!datastart.Value     
  </code></pre>
  
  <p>but this also didn`t work.</p>