To create hierarchy, the FastReport engine needs two values: the row ID and its parent row ID. In this report, the row ID is represented by the Employee.EmployeeID column; its parent row is Employees.ReportsTo column. To create the report:
- select the databand and go to the Properties window;
- set the "IdColumn" property to "Employee.EmployeeID";
- set the "ParentIdColumn" property to "Employee.ReportsTo";
- the "Indent" property will be used to shift the databand rows according to hierarchy level. Set it to a desired value.