Back to Devexpress

HierarchyPrintOptions.ChildListFieldName Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-hierarchyprintoptions-7095d2de.md

latest2.7 KB
Original Source

HierarchyPrintOptions.ChildListFieldName Property

Specifies the child list field that the report’s data exposes if it is recursive.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[DefaultValue("")]
public string ChildListFieldName { get; set; }
vb
<DefaultValue("")>
Public Property ChildListFieldName As String

Property Value

TypeDefaultDescription
StringString.Empty

The name of the field that stores a list of child data objects (records).

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ChildListFieldName
DetailBand

.HierarchyPrintOptions .ChildListFieldName

|

Remarks

Set this property if your report’s data is recursive. Assign the collection of child objects (records) if they have the same type as the parent objects (records).

csharp
public class MyData {
  public MyData() {
    Children = new List<MyData>();
  }
  public List<MyData> Children { get; set; }
}
vb
Public Class MyData
  Public Sub New()
    Children = New List(Of MyData)()
  End Sub
  <Index(0)>
  Public Overridable Property String() As String

  <Index(1)>
  Public Overridable Property Children() As List(Of MyData)
End Class

After you specify the ChildListFieldName property, the report’s Detail band is printed in tree mode.

Note

Tree mode is supported for recursive data and data with ID-ParentID related fields. Specify either the ChildListFieldName property or the KeyFieldName-ParentFieldName property pair.

See Also

HierarchyPrintOptions Class

HierarchyPrintOptions Members

DevExpress.XtraReports.UI Namespace