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!

Grouping (conditional?)

Status
Not open for further replies.

mmwdmr

Technical User
Jan 10, 2002
119
US
I am using Crystal version 9.

I have an employee field that uses 4 codes - 1,2,3,4. I would like to able to group on code 1 only if the employee field = 1 and not group when the field contains 2,3,4. I thought of grouping in specified order but have not tried it because I don't want codes 2,3,4 as one group (all others) but left as individual codes in the details section while code 1 is still grouped.

Any help would be appreciated! Thanks!
 
Can you explain why you would want to do this? You must create a formula like {@Empl1ornot}:

if {table.employeeID} = 1 then "Empl1" else "Others"

I'm guessing that you don't want to show the group header or footer except for "Empl1", so then you would go to the section expert->group header (and then group footer)->suppress->x+2 and enter:

{@Empl1ornot} = "Others"

-LB
 
Actually, I am trying to help a co-worker so I'm not sure what his reason is for wanting this...

Would your solution still leave employeed codes 2,3,4 ungrouped? I don't want them lumped into an "others" group but rather still displayed in the details section even though code 1 is grouped. Maybe this isn't even possible?

Thanks!

 
They would appear as ungrouped, though grouped, like this:

Empl 1
empl1 detail
empl1 detail
Empl 1 total
empl2 detail
empl2 detail
empl3 detail
empl4 detail
empl4 detail
empl4 detail

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top