Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Runnning Total?

Status
Not open for further replies.

lkerr

Technical User
Mar 2, 2005
162
US
I'm pretty new to all this, so excuse me if this is a stupid question. :) I'm using CR9 with an SQL server, and here's my problem: I'm creating a report which involves {username}, {id}, and {value1}, {value2}, which looks something like this:

GH: 12-4785

Detail: Frank $23.45 $45.56
George $45.34 $45.23
Bob $34.57 $98.54

GH: 11-7389

Detail: Sue $98.38 $65.25
Bob $34.57 $98.54
George $45.34 $45.23

As you can see, the second ID# contains several users that are the same. Currently, my running totals would be: $281.65 and $398.35 because they are adding in those duplicate users.

I want them to leave out the 2nd Bob and George entries (Bob & George will always be the exact same. :) so the numbers would look like this: $201.74 and $254.58.

I need some help, please!? Thanks in advance!
 
You can prevent duplicates by a formual saying
name <> Previous(name). But that depends on the records being in name sequence, which your data is not.

You might need to do a subreport that reads the record in name sequence, suppresses the details, totals with duplicates excluded and then gives you the answer. Subreports are inefficient, but if it is just one for the whole report, it would not be too bad.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top