title: if condition in a for-each-group BI Publisher report
body: <p>Im trying to get a summary output that displays data based on Product that have different CwaOrderType.</p>
  
  <pre><code>&lt;?for-each-group:OrderEntry-LineItems[../../CwaChannel='Customer Portal' and ../../Status='Submitted'];Product?&gt;
  &lt;?Product?&gt;
  &lt;?if:CwaOrderType='PRS Sales'?&gt;
     &lt;?count(current-group()/.)?&gt; 
     &lt;?sum(current-group()/CwaLineTotalAmount2)?&gt;
  &lt;?end if?&gt;
  &lt;?if:CwaOrderType='PRS Switching'?&gt;
     &lt;?count(current-group()/.)?&gt; 
     &lt;?sum(current-group()/CwaSwitchOutUnits)?&gt;
  &lt;?end if?&gt;
  &lt;?end for-each-group?&gt;
  </code></pre>
  
  <p>However, it will return the output to blank. If I removed the if-condition, it works but it is inaccurate. Can any of you guys tell me what is missing?</p>