title: Report Viewer: Set null value to Report Parameters having allow null true
body: <p>I have a Report Viewer Control in my Web page which is responsible to show all the reports.</p>
  
  <p>I want to get the parameters of the report and check if the parameter has allow null property true then I want to pass the parameter value to null.</p>
  
  <p>For this I have tried below code but I am getting AllowBlank property as false for all the parameters:</p>
  
  <pre class="lang-cs prettyprint-override"><code>ReportParameterInfoCollection defaultParams;
  List&lt;ReportParameter&gt; reportParams = new List&lt;ReportParameter&gt;();
  defaultParams = ReportViewer1.ServerReport.GetParameters();
  
  if (defaultParams.Count &gt; 0)
  {
       foreach (ReportParameterInfo rp in defaultParams)
       {
           if (rp.AllowBlank)
           {
               string str = null;
               reportParams.Add(new ReportParameter(rp.Name, str));
           }
       }
  }
  </code></pre>