title: Pass parameter to rdlc from page with reportviewer
body: <p>I have a visual studio 2013 web application which works with entity framework and I want to display a simple tabular data report using a RDLC report. </p>
  
  <p>I have created a seperate web page and added a reportviewer control. Also I have created a RDLC file and added the data source from a C# function which returns a <code>List</code> of custom objects. This way it is configurable from the report designer, but when the page loads in the browser an error <code>A data source instance has not been supplied for the data source 'DataSet1'</code> is shown.</p>
  
  <p><strong>Report design</strong>
  <img src="https://i.stack.imgur.com/C6s9s.png" alt="enter image description here"></p>
  
  <p><strong>HTML markup</strong></p>
  
  <pre><code>    &lt;rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
          WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"&gt;
          &lt;LocalReport ReportPath="Alumni\Reports\Report1.rdlc"&gt;&lt;/LocalReport&gt;
      &lt;/rsweb:ReportViewer&gt;
  </code></pre>
  
  <p>For above implementation I got the error of not giving a data source, but as <a href="https://stackoverflow.com/users/968303/yuliam-chandra">Yuliam Chandra</a> suggested, I added the below code and now the report works.</p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
      {
          if (!IsPostBack)
          {
              ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", Business.ReportManager.GetMemberDetails(1)));
          }
      }
  </code></pre>
  
  <p>Please help me to solve this issue. I just need to display a simple report using RDLC and the data source is a public static function with an argument which returns a list of objects.</p>