> For the complete documentation index, see [llms.txt](https://cqube.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cqube.sunbird.org/use-cqube/visualizing-the-data/enhance-customize-cqube/manual-and-automated-testing/table-drill-down-customization.md).

# Table Drill Down Customization

A service named report-drill down-service  has been created to maintain the state of the drilldown in a given program, which can be found in the below path of the dashboard ms codebase:&#x20;

`src/app/core/services/report-drilldown/report-drilldown.service.ts`

In order to implement the drill down feature in a given table report, subscribe to the above service in the ngOnInit lifecycle function as shown below.

<figure><img src="https://lh3.googleusercontent.com/lz121e77GyjMoxNAz_S-lbDSbHsT0L5RsCWr6KLIFqiOLDgpG3HvTUm4tBDYxmsClwmboFP_bE1PsnAE7tAKZ0zBoqJRObzpd3DOF-srqRNxmZFNJH8M2oxeR7aLsfg1zOAj03iNvX-cPWT2ggnBIF8" alt=""><figcaption></figcaption></figure>

Add the drilldown function to the table report component file. (In future this function will be placed in the service itself). For reference the function can be found in the below file: src/app/views/teacher-attendance/pages/teacher-attendance-summary/reports/tas-average-attendance/tas-average-attendance.component.ts

To enable clickable level columns in the table add the below configuration into the column object of the table report configuration.<br>

<figure><img src="https://lh5.googleusercontent.com/fknytDWBEgeu7h8l-v4p7Tvb6QQBM_0XT20as1NRYGnL_xrClpD7Pizw94hhesDdVDkowRPV87B8FGT9GDNzDS9ThvnAe2y-JgMz8K8_w4dSOxNxwT6CfnERkIrJQRIdsY93IBrxX39Ahv242--U1gQ" alt=""><figcaption></figcaption></figure>

Here are the steps:

* dataProps is to specify what property name the column be and alias name of that property.
* hierarchyLevel specifies which level the current column is in.
* linkedReports represents which other reports will be affected by the drilldown of this table.
* allowedLevels restricts the drill down to specified levels in the array

To Link a report to drill down features of another report, subscribe to the service like above and add the drilldown function to the report component file.<br>

For reference follow the implementation in the below file&#x20;

src/app/views/teacher-attendance/pages/teacher-attendance-summary/reports/average-attendance-school-table/average-attendance-school-table.component.ts

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cqube.sunbird.org/use-cqube/visualizing-the-data/enhance-customize-cqube/manual-and-automated-testing/table-drill-down-customization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
