title: Crystal Reports - Get value from linked table conditionally
body: <p>I'm new to Crystal and trying to figure out how to bring in a value from a table with multiple matches without creating duplicate rows.</p>
  <p>I have a table of inventory items, and each inventory item has several matches in a costs table.  For example inventory item 1234 may have a match for a labor cost, a material cost, and an overhead cost.</p>
  <p>What I'd like to do is to have a single row for the inventory item, a column for it's labor cost, a column for it's material cost, etc.</p>
  <p>So far the best I've been able to do is to create a formula field for the labor cost and use a conditional to show the cost if it's labor cost type id, but that just resulted in multiple rows where only one showed the cost and the rest showed zero.</p>
  <p>What I would probably do in SQL (right or wrong) would be to create common table expressions for each type with the item id and the cost so each CTE would have only one cost value, then link those CTEs to the main query.</p>
  <p>I know this is probably a really basic thing to do, but I couldn't seem to find any answers with Google.  I'm happy to read over a resource if someone could just point me in the right direction.</p>
  <p>Thanks in advance.</p>