This question is a follow-up to a question I asked the other day ("Need to find duplicate records but exclude reversed transactions").
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:
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
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):
Date; Qty; Value;
1/14/08 5 20
1/20/08 8 56
1/22/08 9 62
1/22/08 9 62
I already have a query 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.
Please let me know if I am being unclear. I appreciate your wisdom in advance!