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

Suppress if... 1

Status
Not open for further replies.

bv0719

MIS
Dec 19, 2002
131
US
Report is Sales by Salesman by Customer by Product Category.

Grouped by Each

How can I suppress the customer group field if the following is true.

If the customer has sales in PCAT 390-394 suppress the customer from displaying in the report.

Thanks in Advance.

Bill

 
Create a formula {@PCAT390-394}:

if {table.prodcateg} = "PCAT 390-394" then 1 else 0

Then use the following suppression formula for the group header, details, and group footer section:

sum({@PCAT390-394},{table.customer}) > 0

You could (instead) use group selection. Go to report->selection formula->GROUP and enter:

sum({@PCAT390-394},{table.customer}) = 0

-LB
 
Well... The first formula worked. But the suppression formula doesn't want to work. I need to use the group in the formula as well.

if GroupName ({INSALES.ProdCat}) in "390,391,392,393,394" then 1 else 0

This formula puts a 1 and 0 next to the appropriate PCAT.

When I try the suppression formula below the formula errors out.

sum({@pcat},{INSALES.Customer})>0

sum({@pcat},GroupName ({INSALES.Customer}))>0

Crystal says the field {pcat} cannot be summarized on the first formula. Ont the second it says "the ) is mising".

Any thoughts would be appreciated.

Best,
Bill V
 
I have never had occasion to use "GroupName" in a formula, and am not sure why you changed the formula to use it. Assuming that Product Category is a string field, your first formula, which should be placed in the detail section, should read:

If {INSALES.ProdCat} in "390" to "394" then 1 else 0

You need to have inserted a group on {INSALES.Customer}. Use the following for suppression:

sum({@pcat},{INSALES.Customer}) > 0

-LB


 
LB,

Thanks so much for the help. I put the group name in the formula while testing different formulas based on what you reccommended. Seemed to make sense and worked but as you said in the post above the formula should be in the details section. The formula with the group was put in the group section. Granted it worked but it wasn't your recommended solution.

The suppression formula returns a value of TRUE regardless of where I place it however.

The group and detail sections are as follows:

GH1 - Salesman Group
GH2 - hidden and empty
GH3 - hiddne and empty
details - detail from insales file- SLSM, PCAT, Prod, WHSE, INV #, Qty, Price, Net
GF3 - PCAT Group
GF2 - Customer Group
GF1 - Slsm Group Totals (Net Sales)
RF - Grand Totals

I would like to suppress customers (GF2) from displaying on the report if they have values in PCAT's 390-394 from the GF3 group.

I understand what you're trying to accomplish with assigning a 0 or 1 with the first formula but the suppression formula isn't quite right, or I'm not putting it in the right spot.

Thanks,
BV
 
The suppression formulas belong in the section expert. Go to format section->highlight GF2, GF3, and details (one at a time)->suppress->x+2 and enter the formula there. I'm assuming you want GF3 and the details suppressed, too, if you have the GF2 suppressed.

-LB
 
You are the Best! Thanks for your patience. Worked great!

Best,
BV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top