Link to home
Start Free TrialLog in
Avatar of need_solution
need_solution

asked on

need to suppress group in group tree when it is blank/null

I have a 3 groups in Group Expert: Grp1, Grp2 and Grp3 and I have  a parameter: {?Type}: A and B.

So, my logic is
For {?Type} = 'A', Group 2 is always Blank for all the Grp1s
but For {?Type} = 'B', Group 2 is blank for all the Grp1s except one, which lets say, Grp1 = 'ABC'

I have suppressed Group 2 header with the formula:

{?Owner} = 'A'
or
(
    {?Owner} = 'B'
    and
    GroupName ({Command.group1}) <> 'ABC'
)

This suppressed the Group header but did not suppress the group from the tree for all group1s except 'ABC'.

Please see the attached word doc, the groups pointed with blue arrow are the blank ones, which i want to suppress. How do i do it?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of need_solution
need_solution

ASKER

oh!
I will close the question then, Thank you so much!
I don't see anything attached to your first post, so I can't see your example, but what do you mean when you say that group 2 is "blank"?  Do you actually not need group 2 at all in those cases, or do you still need the group and you just want to suppress the group headers, etc.?

 If you don't need the group, I'm wondering if you can at least partially get what you want by changing the grouping.  For example, create a formula like the following and have group 2 be on that formula, instead of the group 2 field:

if {?Owner} = 'A' or ({?Owner} = 'B' and GroupName ({Command.group1}) <> 'ABC') then
  ""
else
  {group 2 field}

 Then when you don't want group 2, you'd get one group 2 with an empty name.

 I really don't know if that's even close to what you want.  Just thought I'd throw out the idea.

 James
James,

I have attached the file again.
and you are right, I don't want to see the grp 2 when it is blank. I can suppress the Grp 2 Header on the report but can't really suppress it from the Group tree. I hope you can view my attachment. Instead of using the formula which you have suggested, I am already doing it in my command. but I still can not suppress the blank groups from the Group tree. But I will try using the formula too.
Here is the file
grp-tree.docx
I don't think you can suppress the blank groups in the group tree, but a blank group name might be better than showing the regular group name.

 The other thing is that if you use a formula like the one that I posted for group 2, you'll only get one group 2 for the group 1's that don't meet your criteria.  For example, if you originally had

ABC (group 1)
  1 (group 2)
  3 (group 2)
DEF (group 1)
  1 (group 2)
  2 (group 2)
  3 (group 2)
  4 (group 2)

 the formula would combine all of the group 2's under DEF, so you'd get

ABC (group 1)
  1 (group 2)
  3 (group 2)
DEF (group 1)
  <empty string> (group 2)

 So, you'd still get a group 2 under DEF in the group tree, but you'd only get one, and it would have a blank name.

 James