Retrieve reports_to for all employee under someone

Hello all,

Each Employee has a “reports_to” field in Form, so a complete org chart can be built.

I want to start from someone, and retrieve every one reporting to him and build an array.

Any advice on how to do this?


Organization Chart is already available in ERPNext.

Just search Organizational Chart in Awesome Bar.


I know the org chart is already available. Thank you.

I need to retrieve the reports_to chain of people.