troubleshooting Question

suppress duplicates in formula

Avatar of stkoontz
stkoontzFlag for United States of America asked on
Crystal Reports
7 Comments2 Solutions874 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros