title: Ignore negative value
body: <p>I tried to search this problem and unlucky to solve.</p>
  
  <p>I have a generated report using the <code>rdlc</code>, now, I want to sum all the positive numbers not including the negative in <em><code>rdlc</code> coding way</em>.</p>
  
  <pre><code>     Credit
       ------
            3
            3
            3
            3
            3
            3
            2
           -3
           -2
       ------
  Total:   20
  </code></pre>
  
  <p>So, the main point is <strong>ignore</strong> the <strong>negative</strong> and <strong>sum</strong> the <strong>positive</strong> numbers. so far this what I have tried and this not the solution of my problem.</p>
  
  <pre><code>=IIF(Fields!creditUnit.Value &gt; 0, Sum(Fields!creditUnit.Value), 0)
  </code></pre>
  
  <p>Anybody can help me?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>This was my temporary solution, since my generated report is good for only one page. I create a parameter for <strong>Total</strong> </p>
  
  <pre><code>var total = creditsList.Where(c =&gt; c.HasValue &amp;&amp; c.credit &gt; 0).Sum(c =&gt; c.credit.Value);
  var totalParam = new ReportParameter("total", total);
  </code></pre>
  
  <p>I hope that one of you guys can help me in what would be the solution in <em>rdlc coding way</em> to sum all the positive numbers.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I included the <a href="/questions/tagged/vb.net" class="post-tag" title="show questions tagged 'vb.net'" rel="tag">vb.net</a> because the way the coding of <code>rldc</code> is <code>VB</code> syntax.</p>