To suppress just a field and not the entire header:
- Right click on the first text object
- Select Format Text from the menu
- On the Common tab, find the checkbox labeled Suppress. Don't check it though.
Instead, click on the x+2 button on the right side.
Note: It is quite far away from the Suppress checkbox it belongs to. See screenshot below for help with finding the button.
In the formula box that appears, type your condition for suppressing the text box. For example, if you want to suppress the text field if the header is "ABC" then you may want to enter the following:
{@HeaderField} = "ABC"
- Repeat for the next text field.
However, there may be an easier way for you to go about this. Instead of having two text objects, create one formula with an IF-THEN-ELSE statement within to determine which text is displayed.
For example:
If {groupname} = "ABC" then "first set of text"
Else if {groupname} = "DEF" then "second set of text"
Else "Error"
or
If {groupname} = "ABC" then "first set of text"
Else "second set of text"
or
Select {groupname}
Case "ABC": "first set of text"
Case "DEF": "second set of text"
Default: "Error"