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!

Complex record selection

Status
Not open for further replies.
Jul 21, 2001
102
US
I am on Crystal 9, Oracle 9.

Here is my table of gifts and donors. A donor can make gifts to multiple funds.

Gift Donor Fund

1001 000120 Buildings
1002 000130 Research
1003 000140 Music
1004 000150 Scholarship
1005 000120 Research
1006 000130 Music
1007 000150 Research

I want to select donors to Research but only if they are not also donors to Music. Donors 000130, 0000120, and 000150 have all given to Research but of these 000130 has also given to Music. The result I want is Donors 000120 and 000150.

Can I select on this basis?
 
You could first group on {table.donor} and then create a formula {@fundtype}:

if {table.fund} = "Music" then 10000 else
if {table.fund} = "Research" then 1 else 0

Then go to report->edit selection formula->GROUP and enter:

sum({@fundtype},{table.donor}) in 1 to 9999

This would select those who have donated to research but not to music.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top