title: Passing parameters to Crystal report from webforms
body: <p>I have a report and I want to display it on a webform. Reports without parameters are working well. Reports with parameters are creating headache for me. This is the code I have written in BindReport method, which is called on page load event of the form.</p>
  <pre><code>    ReportDocument rpt = new ReportDocument();
      rpt.Load(Server.MapPath(&quot;rptPositionwiseMontwiseActualSale.rpt&quot;));
      rpt.FileName = Server.MapPath(&quot;rptPositionwiseMontwiseActualSale.rpt&quot;);
      rpt.SetParameterValue(&quot;CompanyName&quot;, &quot;Cirin Pharmaceutical Pvt. Limited&quot;.ToString());
      rpt.SetParameterValue(&quot;ReportTitle&quot;, &quot;PositionWise MonthWise Sales&quot;.ToString());
      rpt.SetParameterValue(&quot;parameters&quot;, &quot;Year:2011&quot;.ToString());
      //CrystalReportViewer1.ParameterFieldInfo = paramFields;
      DataSet ds = getReportData();
      rpt.SetDataSource(ds.Tables[0]);
      CrystalReportViewer1.ReportSource = rpt;
      CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;
     
      //CrystalReportViewer1.RefreshReport();
  </code></pre>
  <p>I have tried variety of things like assigning ParameterFieldInfo to reportviewer control, but it shows me prompt on page load asking for parameter values of the report. I'm using .NET 4.0.</p>
  <h2>Edit</h2>
  <p>I'm using push model for Crystal Reports. Does it change the way we can pass parameters to report from asp.net?</p>