Hello Saurabh
You can achieve this by creating relationship in your docgen packages.
- Go to your Docgen packages.
- Click on to the New Relationship Button
- For Type dropdown :Select salesforce Object
- For Related By (What you have) :Select the object on which you are working.In this case select your parent object.
- Relationship (What you want): Select child object which you want to show on to the table.In this case child object of your parent object.
- Related By: Select relationship between them.
- Click on save button.
- After clicking on save button you will a new relationship created in your docgen package.Click on the edit link of the relationship
- In the Relationship Alias: Give a unique alias which differentiate this relationship with others relationship
- In the Copy type: Select Table
- If you want to show it any order then in the Order Relationship by select field from the dropdown and select Descending if you want to show in Descending order.
- Click on save button
- Now go to the Field Tagger select your child object as Main object after that use Replicate Table tag from the field tags section in your template.
- On generating document It will generate dynamic table which shows child object related list of parent object
Hope it may helps