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

Extract identical record for accounts 1

Status
Not open for further replies.

only412c

MIS
Jan 29, 2003
32
US
I am doing an assignment that is to evaluate each customer account number and evaluate if their service fall into one of eight families. If the account # has two or more of the same FamGrp then, I would like these account set aside. For example in account # xxx000, I want to isolated or tag Fam5, records for that account. Any help would be greatly appreciated. Thanks in advance.

The detail would look something like this

account # FamGrp(this is a formula)
xxx000 Fam5
xxx000 Fam2
xxx000 Fam5

xxx111 Fam8
xxx111 Fam8
xxx111 Fam1
xxx111 Fam2
xxx111 Fam8
 
It's unclear what you mean by "set aside" and "isolate or tag". Please show what the report should look like, using your sample data.

-LB
 
Each of the FamGRP have a set of code to define the FamGRP
For example FamGrp FAM5 consist of a group of items 77738,
77393, 77499. We are not trying to identify the items within a group, they are summarized on the FamGRP formula What we are trying to identify is accounts that have multiple FamGrp. In the example above account #
xxx000 have two Fam5 groups and one Fam2 Group. The report should be able to display only the two Fam5 Group record for each account #.

The report should display as follows (eliminating the group that do not have identical account # and FamGrp pairs:
account # FamGrp(this is a formula)
xxx000 Fam5
xxx000 Fam5

xxx111 Fam8
xxx111 Fam8
xxx111 Fam8

I hope this helps. There are a total of 11 FamGRP Families the account can fall under. Some account would have only one FamGrp, while other may have multiple FamGRP
 
Try inserting a second group on {@FamGrp}, and then go to report->selection formula->GROUP and enter:

count({@FamGrp},{@FamGrp}) > 1

Drag the group name for the acct group into the group header or footer for {@FamGrp} and then suppress the other group sections and the details.

-LB
 
Thanks,

I'll give a try tomorrow and let you know. Thanks again for responding quickly.
 
Thanks LB,
It seem to be working fine. One additional question.

The report created also shows a matrix based on columns as follows:
Acct# FamGrp Fam1 Fam2 Fam3 Fam4 Fam5 Fam6 Fam7 Tot
xxx000 Fam5 0 0 0 0 0 1 0
xxx000 Fam5 0 0 0 0 0 1 0
xxx000 Fam3 0 0 1 0 0 0 0
xxx000 Fam3 0 0 1 0 0 0 0
Group row 0 0 2 0 0 2 0 2

I want to set up a counter on the Group row under the Tot field to count if an account has multiple Families(Fam). In the example above acct xxx000 has two families bacause the total count in fam3 and fam5 is greater than 1. I have worked with MS Access doing counter with repetative loops. Is there a way to accomplish this counter on Crystal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top