Partager via


Parent Element (RDL)

Identifies the parent group in a recursive hierarchy.

Syntaxe

<Grouping>
       ...
        <Parent>...</Parent>
    ...
</Grouping>

Element Characteristics

Characteristic Description

Data type and length

String

Default value

None

Cardinality

0-1: Optional element that can occur once or not at all.

Element Relationships

Relationship Element

Parent element

Grouping

Child element

None

Notes

The Parent element is used to create a recursive hierarchy. A recursive hierarchy can be created from a set of data that contains fields that refer to other fields in the same set of data. For example, a table containing a list of employees may contain both an employee ID and a manager ID. By grouping the data by employee ID and identifying the manager ID as the parent, you can create a hierarchy of employees.

The expression within the Parent element evaluates to a variant. Parent can only be used in groups with a single group expression.

Exemple

The following example illustrates the use of the Parent element to produce a recursive hierarchy of employees. The table details are set to group on the EmployeeID field, and the parent is set to the ManagerID field.

<Grouping Name="Table1_DetailsGroup">
   <GroupExpressions>
      <GroupExpression>=Fields!EmployeeID.Value</GroupExpression>
   </GroupExpressions>
   <Parent>=Fields!ManagerID.Value</Parent>
<Grouping>

Voir aussi

Référence

Report Definition XML Elements

Aide et Informations

Assistance sur SQL Server 2005