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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Duplicate Records So Not to Add Value Twice to Total 1

Status
Not open for further replies.

bstafford21

IS-IT--Management
Oct 5, 2003
101
TH
Using Crystal Reports 9

Have database of Work Order Numbers showing seperate Columns of Total Qty Required and Total Qty Stored.

Some Work Order Numbers are listed twice due to using more than one material for this Work Order.

In need to delete the second line of the Work Order so that the total qty is not added twice. Right now I do not know how to delete a duplicate record showing the same qty for the Required Qty & the stored Qty.

I only need to add the qty once. Can someone quide me to the type of formula I should use. I don't think that suppression is correct because it still adds the item even though it is hidden.

Thanks for any help

Bill
 
It is not a matter of deleting, but of removing the duplicate from calculations. Try using the running total expert where you choose sum of {table.qtyrequired}, evaluate on change of {table.workrorder}, reset on change of {table.account} or whatever your group field is, or if you have no groups, choose "reset never".

-LB
 
Hi,

Thanks lbass for the help, that has done exactly what I needed.

Did not know about that option, learned something again today.

Thanks

Bill
 
I was needing help on a subtotaling problem that was like this... your suggestion... WORKED. This is the BEST forum... I have NEVER been let down yet!

Never say NEVER right....>?????

Thanks again.

Mike

"A man is only as happy,... as he makes up his mind to be...
 
All, I have a brain wrecker...

CR 9 Oracle DB, 1 table: CHART. Looks like this:

CHART# SEEN BY CLASS
12345 Jack Doctor
12345 Jill Nurse
11445 Nancy Doctor
56487 Joe Doctor
46898 Jack Doctor
46898 Diane Nurse
67678 Jill Nurse

Trying to count with a twist:

1. If the patient has ben seen only by a doctor, give the doctor credit.
2. If the patient has been seen only by a nurse, give the nurse credit.
3 If the patient has been seen both by a Doctor and a Nurse, give the Nurse credit

So in the above scenario the count would be as follows:
JACK: 0
JILL: 2
NANCY: 1
JOE: 1
Diane: 0

(The real table is about 12,000)

I've tried maybe splitting the table for duplicates or inserting a running total. no luck so far.
Any help would be greatly appreciated.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top