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

Hiding group based on details 1

Status
Not open for further replies.

-cush-

Programmer
Feb 18, 2004
145
US
Is there a way in a group selection formula to show a group only if a certain detail shows in the detail section? There may or may not be other details as well. I want all details to show, along with the sumations of the details, but I want the entire group not to show if at least one of the details is not a specified value.
 
You've said two conflicting things here:

1-show a group only if a certain detail shows
2-entire group not to show if at least one of the details is not a specified value

Which is it? For #1, you can write a formula like this:

//{@present}:
if {table.field} = <your criterion> then 1

Then use group selection:

sum({@present},{table.groupfield}) > 0

-LB
 
Thanks, that should work. I don't see the conflict though. #1 states when they should show and #2 states when they should hide. #2 is the double negative of #1.
 
No, they aren't really the same. In the first scenario where
you want to see those groups that contain A, Groups 1 and 2 would display based on the following sample data.

Grp 1
A
B
C

Grp 2
A
C
D

Grp 3

B
C
D

If you then wanted the groups NOT to show if they had at least one value that did NOT = A, then NONE of the groups would display, since they all contain values <> "A".

-LB
 
You're right I should have said, I wanted the entire group not to show if none of the details were a specified value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top