title: Equivalent of WHERE clause in Crystal Reports
body: <p>This Crystal Report program was dumped on my lap and I'm brand new to it. I understand the concept, but I'm hitting a wall here.</p>
  
  <p>There is another question that's similar:
  <a href="https://stackoverflow.com/questions/9439169/crystal-reports-equivalent-of-where">Crystal Reports equivalent of &#39;WHERE&#39;</a></p>
  
  <p>But it and the answers are directed towards (it seems) "totaling" the column, whereas I want to simply <em>only show</em> the row if one of the columns (in this case, if "CostType" is equal to 0).</p>
  
  <p>I have two data tables I'm reading from to create this report. They're joined via a common column name (ItemKey). Unfortunately, in the second table, there are multiple records of the same item. I only want the item(s) with a CostType of 0.</p>
  
  <p>This is stupidly easy in SQL, even for a beginner like me, but I can't figure out how to effectively say: "only show an item if the CostType is 0" with Crystal Reports.</p>
  
  <p>Item_Cost Table (example):</p>
  
  <pre><code>ItemKey      Special         Cost         CostType
  001          TRUE            55.00        0
  002          FALSE           10.00        0
  003          TRUE            20.00        1
  </code></pre>
  
  <p>Item Table (example):</p>
  
  <pre><code>ItemKey      Description     Mode  
  001          Whatever        EE 
  002          Random          AB 
  003          Unimportant     GE
  </code></pre>
  
  <hr>
  
  <p>What shows up:</p>
  
  <pre><code>Item         Description     Mode  
  Box          Whatever        EE 
  Square       Random          AB 
  Circle       Unimportant     GE
  </code></pre>
  
  <p>What I want to show:</p>
  
  <pre><code>Item         Description     Mode  
  Box          Whatever        EE 
  Square       Random          AB 
  </code></pre>
  
  <hr>
  
  <p>I hope this all makes sense. Basically, if this was a SQL query, I'd just say "WHERE CostType = 0" at the end and I wouldn't get all of the other items that have different cost types. </p>
  
  <p>I should mention that this is entirely handled by Crystal Reports. I'm not using a SQL string and passing it in or something. The function for showing the window is as follows:</p>
  
  <pre><code>    Dim PartsDemandReport As CrystalDecisions.CrystalReports.Engine.ReportDocument = New crptIndentedBomXLBom
      PartsDemandReport.SetDataSource(GLOBAL_VARIABLES.GlobalBomIndented)
  
      Dim CrystalReportViewerForm As New frmCrystalReportViewer
      CrystalReportViewerForm.CrystalReportViewer1.ReportSource = PartsDemandReport
      CrystalReportViewerForm.Show()
      PartsDemandReport = Nothing
  </code></pre>
  
  <p>If there's a way to simply force Crystal Reports to add that "WHERE CostType = 0", that'd be great. Thanks in advance.</p>