title: How can I hide duplicate records (within a crystal report) which have already been reversed?
body: <p>This question is a follow-up to a question I asked the other day <a href="https://stackoverflow.com/questions/302022/sql-need-to-find-duplicate-records-but-exclude-reversed-transactions">("Need to find duplicate records but exclude reversed transactions")</a>.</p>
  
  <p>I have a Crystal Report which displays customers' fuel transactions.  There are occasions when a duplicate transaction will be imported erroneously.  If/when this error is discovered, the admin will reverse transaction, thus leaving the two original duplicates and a "negative" transaction for the reversal.  Example:</p>
  
  <pre><code>Date;     Qty;     Value;     Reversal
  
  1/14/08     5       20         N
  1/14/08     5       20         N
  1/14/08    -5      -20         Y
  1/20/08     8       56         N
  1/22/08     9       62         N
  1/22/08     9       62         N
  </code></pre>
  
  <p>Ideally, the customer will only see SINGLE transactions (or a duplicate transaction which has not been reversed yet).  If the transaction has been reversed, we only want them to see the original unique record.  Example (based on data above):</p>
  
  <pre><code>Date;     Qty;     Value;
  
  1/14/08     5       20
  1/20/08     8       56
  1/22/08     9       62
  1/22/08     9       62
  </code></pre>
  
  <p>I already have a <strong><em>query</em></strong> which will return the data in the way I just described, but I need to integrate it with a crystal report which requires joins to other tables.  Performance is TERRIBLE if I use the sql that I already have, so I'm trying to see if it would be possible to hide duplicate (reversed) transactions within Crystal's formulas instead of using a SQL command as a table joined to other tables.</p>
  
  <p>Please let me know if I am being unclear.  I appreciate your wisdom in advance!</p>