Hi Tom,
I don't think $if will be able to do what you need. $if has the capability to check the value of a particular property (e.g. name or priority), and it can check the existence of items in the context of an owning item, (e.g. checking if Notes exist inside a $repeatUseCases, or requirements exist inside $repeatPacakges). It can't however check for existence of items outside the owning context nor can you check for the existence of a pariticular kind of element (e.g. can't say $if Requirements Exist where priority = 1).
What I would suggest is to use $table instead of $repeat and include your header as the first row of the table. What happens is when CaseComplete determines that there are no elements that fit the criteria to fill the table, it removes the table from the report. It does this to avoid a lot of empty tables in the report. So, you could do something like this:
+----------------
| SECURITY REQUIREMENTS
+----------------
| $tableRequirements where Package = ‘Security Requirements’
| $Name
| $Description
| ...
+-----------------
The dashes represetent the rows of the table in Word. Note that you can turn off borders so that it doesn't look like a table if you don't want it to. Hope this workaround can work for you. Let me know if you have any questions.
Doug