Jagamisviis:


Parent Element (RDL)

Identifies the parent group in a recursive hierarchy.

Syntax

<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

Remarks

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.

Example

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>

See Also

Reference

Report Definition XML Elements

Help and Information

Getting SQL Server 2005 Assistance