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

Suppressing entire order in report 2

Status
Not open for further replies.

buckslor

IS-IT--Management
Sep 6, 2011
11
0
0
US
Hi

I need help with a formula that can suppress an entire order if it contains a certain item. For example, I'd like to suppress the entire order if it contains a TV.

Order # 1
item 1: CD Player
Item 2: DVD Player
Item 3: TV

Order # 2
item 1: CD Player
Item 2: DVD Player

Order# 3
Item 1: IPOD
Item 2: TV

I want to be able to suppress both Order # 1 and # 3 entirely and have only Order # 2 display on the report since it doesn't have a tv on the order. I'm able to suppress just the item TV but not the entire order.

Any point in the right direction would be greatly appreciated.

Regards
 
Rather than suppression, you can use group selection. Create a formula like this:

//{@hasTV}:
if {table.item} = "TV" then 1

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

sum({@hasTV},{table.order}) = 0

-LB
 
buckslor,

A formula field to Identify TV's, then a group selection criteria will do the trick.

{@isTV}
Code:
IF {Item.Description} = "TV" THEN 1 ELSE 0

Group Selection:
Code:
Sum({@isTV},{Table.OrderID})>0

Hope this helps! Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Many thanks. I've never used that Group selection before but both solutions worked great.

Kind regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top