title: Report Designer - Nest IIF inside a Sum with multiple datasets
body: <p>While there are many code samples for the individual pieces of this question, as a neophyte with Report Designer, I cannot get the syntax for this correct.</p>
  
  <p>I have a textfield that I want to display a SUM of "Held Hours" from one of three DataSets, and this is determined by another field in that same DataSet having a value of "H."</p>
  
  <p>So taking it in pieces, this works to sum ALL hours in ReportDataset.</p>
  
  <pre><code>=Sum((Fields!RegHrs.Value + Fields!OvtHrs.Value),"ReportDataset")
  </code></pre>
  
  <p>Now, somehow i need to nest that in an IIF.  I need that SUM expression to be the "True" return from the IIF when the BillStatus = "H."</p>
  
  <pre><code>IIF(Fields!BillStatus.Value = "H",true,false)
  </code></pre>
  
  <p>I cannot seem to figure out how to combine the IIF and the SUM so that they pull from "ReportDataset" and are syntactically correct.</p>
  
  <p>I've been trying various permutations of this:</p>
  
  <pre><code>=Sum(IIF(Fields!BillStatus.Value = "H",((Fields!RegHrs.Value + Fields!OvtHrs.Value),"ReportDataset"),0))
  </code></pre>
  
  <p>Any pointers?</p>
  
  <hr>
  
  <p>New Info:</p>
  
  <p>The following reports as syntactically correct, but gives me 0 for a return value.</p>
  
  <pre><code>=Sum(IIF(Fields!BillStatus.Value = "H", (Fields!RegHrs.Value + Fields!OvtHrs.Value),0),"ReportDataset")
  </code></pre>
  
  <p>There should be hundreds of hours returned.</p>