共用方式為


Parent Element (RDL)

Identifies the parent group in a recursive hierarchy.

語法

<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

備註

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.

範例

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>

請參閱

參考

Report Definition XML Elements

說明及資訊

取得 SQL Server 2005 協助