title: Passing Parameters to Sub Reports in RDLC Under VS 2010
body: <p>Currently I'm working on a reporting website in VS 2010 using ASP.Net 4.0 and the 2010 RDLC designer. The report I'm building is similar to a Master-detail report, but I'm trying to do it with nested tables.</p>
  
  <p>My issue is that I'm trying to pass a field value from my main report to a sub report. The table setup looks something like this:</p>
  
  <p>2 Tables</p>
  
  <p>First Table: [RecordID, Name, Date,]
  Second Table: [RecordID, Description, DueDate]</p>
  
  <p>What I want to do is a table like this:</p>
  
  <pre><code>-------------------
  |  Name  |  Date  |
  ------------------------------------
     |  Description1 |  DueDate      |
  ------------------------------------
     |  Description2 |  DueDate      |
  ------------------------------------
  | Name2 | Date2 |
  -----------------
  </code></pre>
  
  <p>With the entries for Description and DueDate bieng part of the sub report.</p>
  
  <p>When I try to pass the RecordID in to the subreport as a parameter, which I have to manually define in the XML of the subreport because I can't find anywhere in the designer UI that will allow me to add report parameters to RDLC files, I get an error from the main report that says:</p>
  
  <pre><code>An error occurred during local report processing.
  Value cannot be null. Parameter name: value 
  </code></pre>
  
  <p>So it appears to be erroring out before it ever reaches the point where it does the subreport loading.</p>
  
  <p>I am getting data sent to the main report just fine, and if I remove the parameter from the subreport the data comes through. But if I add the parameter the report throws the error.</p>
  
  <p>Does anyone have any ideas on what might be causing this?</p>