Share this page

# Create a document report with descendants

This flow demonstrates how to generate a document report with a rest API, including entity descendants.

In this topic:

## Overview

When working with entities, it is often important to view information about the descendants that were created under the entity.

For example, when looking at test runs under a given feature, we see test runs that were related directly to the feature (that ran tests directly related to that feature). ALM Octane also allows you view to the test runs related to descendants of the feature entity, such as user stories.

You can instruct ALM Octane to show test runs for a feature along with the runs for its related user stories. In the above example, when you indicate to include descendants for the feature, it will also return the tests runs related to the user stories.

The REST API's include_all_descendants field corresponds to the Descendant inclusion option in Analysis and reporting tools. To include the descendants in your report, set the field to true: `"include_all_descendants": true`.

In the example below:

Feature A

> Test A

> run A

> Story B

> Test B

> run B

- If you do not include descendants, it will only return test run A.
- If you include descendants, it will return test runs A and B.

Note: Descendant inclusion is only relevant for hierarchical entities, such as work_item, test, requirement, and application module.

Back to top

## Example - Hierarchical entity with a direct relation

The following example illustrates the generation of a document report in PDF format in which include_all_descendants was set to true. It will return all tests covering the descendants of the work_item entity.

    {
       "document_type":"PDF",
       "document_orientation":"PORTRAIT",
       "timezone":"UTC+03:00",
       "file_name":"Octane_Doc_Report.pdf",
       "report_entries":[
          {
             "entity_name":"work_item",
             "fields":[
    		"id", "name"
             ],
             "layout":"DETAILS",
             "report_entries":[
                {
                   "entity_name":"test",
                   "fields":[
                		"id", "name"
                    ],
                   "related_field_name":"test",
                   "include_all_descendants":true,
                   "layout":"DETAILS"
                }
             ]
          }
       ]
    }

Back to top

See also:

- How to work with the REST API
- Common flows and ER diagrams
- Analysis and reporting tools

https://admhelp.microfocus.com ALM Octane 8942
Tips to improve your search results... ALM Octane Help Center ALM Octane Help 15.1.90 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: