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!

Supressing Records after reading a code

Status
Not open for further replies.

terenceb

Programmer
Jun 10, 2003
77
US
Hi All,

I am using Crystal 8.5 connecting to a Cashe database. I need to supress all other records for a client if the Target Pop field reads "ADMRI" or "ADSN". If the client does not have one of the previous mentioned Target Pop codes his records should not be supressed.

It is possible for my clients to have "ADMRI" and "CSNMI" and "ADTNC". If this is the case I only want to see the record with the "ADMRI".

However, if a client has "CSNMI","PDTNC" and "ADTNC" I want to see all of his records.

I need help with a formula that will be placed on the detail section.
 
Group on {table.client} and then create a formula {@target}:

if {table.targetpop} in ["ADMRI","ADSN"] then 1 else 0

Then go to the section expert->details->suppress->x+2 and enter:

if sum({@target},{table.client}) > 0 then
not({table.targetpop} in ["ADMRI","ADSN"])

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top