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

Selecting Records - Newbie

Status
Not open for further replies.

bhansen

IS-IT--Management
Mar 14, 2002
53
CA
My Data

ABC
Wat01 2
Gar01 2
Sew01 2
ABCD
Wat01 1
Gar01 1

Part 1:
I only want to display data that does not have all three records.
Part 2:
The three records must have the same quantity for each.

Thanks
 
you are going to have to discribe your needs a little better

"Part 1:
I only want to display data that does not have all three records."

So in your above example you would NOT want to report on group ABCD...is that it?

"Part 2:
The three records must have the same quantity for each."

So Group ABC is still ok then?

Are there only 3 record values for each major group?
I assume Wat01, Gat01 and Sew01 are values of some table.field....are these the ONLY values for that field?

This cannot be evaluated on the server...this can only be done as you are printing the report. In the detail section you would have a formula that would look for these records and see that the values associated with them are met....if they are then you would reveal the good data in a footer associated with ABC and ABCD...the bad result you would suppress.

Give more details...answer the questions and we will see what we can do

Jim









 
Here is a rough try...

Are ABC and ABCD value in a field? If so, group by that field.

Place one of the "child" fields (EG the field holding WAT01) on the detail section and create a count that is reset at the group. (Right-click, Insert, Pick count)

Right-click on the resulting sumary field in the group footer and pick 'select expert'. Fill out the expert so it says that the summary is greater than or equal to 3.

Now create three formula fields:

@reset
shared numbervar hold := 0

@accum
shared numbervar hold;
if {table.groupfield}<>Previous({table.groupfield}) then hold := {table.number} else
if hold <> {table.number} then 0 else 1

@display
shared numbervar hold;
hold

Place @reset in the group header
Place @accum in the detail
@display in the group footer.

right-click on @display and enter the following logic:

@display = 1


Howard Hammerman,

Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
800-783-2269
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top