Avatar of stkoontz
stkoontz
Flag for United States of America

asked on 

suppress duplicates in formula

I have a database where I need to get totals from 2 different tables.  There's a "credits" table and an "adjustments" table.  Each has an amount column that I need to total up on the same report.  The problem is that when I link them together, I get duplicate records.

Snipit of report showing duplicates
Field explanations:

'adjustment-ID' is the unique identifier for the adjustments table.
'Credit-ID' is the unique identifier for the credit table.

'Total Adjustment Amount' is a running total field with "{adjustments.adjustment_id} <> Previous({adjustments.adjustment_id})" in the 'evaluate' formula

'Credit Total' field is a running total field with "{credits.credit_id} <> Previous({credits.credit_id})" in the 'evaluate' formula

If I sort by 'Credit-ID' then that column works, but throws off the Adjustment Amount.  If I sort by Adjustment-ID the opposite is true.

The $-819.50 at the bottom right is this formula: "{#Adjustment Amount}-{#Credit Total}."  Ultimately I need to subtract the total credits from the total adjustments.

The full report is grouped by name.

Any ideas on how to suppress the duplicates so the formulas calculate correctly?

Thanks,

Steve
Crystal Reports

Avatar of undefined
Last Comment
stkoontz

8/22/2022 - Mon