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

Show entire group if one record matches

Status
Not open for further replies.

RedBean

Programmer
Jul 23, 2002
16
0
0
US
Hi, I was wondering if the experts here can help me with a problem I am having. I have 2 tables, one with order numbers, order dates, custumers, etc. It is linked to another table by order number that contains the specifics of that order, i.e. the specific item, price, etc. There is one field in the detailed table I would like to check, and if it passes then I want all items for a order number to be printed.

For example, the first table would have:
Order# Cust# Date
12345 6789 1/1/02
...

The second table would have
Order# Item# Quantity Price CheckField
12345 1 1000 $1 No
12345 2 2 $100 Yes
...

So for every order# I would go through each item and look at the CheckField to see if it is true for any item of that particular order#, if it is I want to print out all the items of the order# whether it was true or not.

I hope I am making sense. Any help on this matter would be appreciated. I think this deals with suppressing sections rather than record selection formulas, since the selection depends on other records, though I could be wrong. Thanks in advance.
 
Create a formula field to check each line item as follows:

If CheckField="Yes" then 1 else 0.

Subtotal this field by Order Number.

Then in your GROUP selection formula, enter the following:

Sum({@CheckforYes},{OrderNumber})>0

This will display only those orders with at least one "yes" in CheckField. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
dgillz...I've never tried that but I like it if it works properly Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top