For using drill-down functionality, user needs to create two reports i.e. a parent report & a child report:-
Parent report: Primary report to which the drill-down functionality is to be applied
Child report: Secondary report which will open in a new tab or at same place (depending upon the option selected)
Note: Child report should have a filter in which the value will get passed based on where we have clicked in the parent report. We can pass values of multiple columns of a single row based on the click and in those cases those multiple filters will be there in child report. It is always better to create the Child report first. Child report can also have even more filters to get the values of the other filters which the parent report might also be having. So we created first child report, then parent report and then in the parent report we apply customization script.
In order to apply the drilldown script, click on the “Customize” button on the report create or report edit page.
Double click on the drilldown icon to open the following modal window
As our report is having 3 columns we can see the same mentioned here. Now please select the checkbox next to the column name on which you want to click and the child report should open. Click on More button next to it. You will see the following screen.
Click on the checkbox to select whether you want to open the child report in a new tab or in the same tab or you want to implement InterPanel Communication (IPC).
Here in this blog we are going to cover more about “Open in New Tab” or “Open in Current Tab”. If you want to implement InterPanel Communication please go through this blog.
Open in New Tab: This option opens the child report in a new tab.
Open in Current Tab: When this option is selected, the child report opens in the same div/frame/tab as the parent report. So, the child report replaces the space occupied by the parent report. If this option is used, you can add a back button by applying the Back Button customization script. You can refer this blog to add back button.
Click on the Browse button to select the child report to be opened upon drilldown. The file browser will open. Browse to the child report. Select it by left click and then click on the “Select” button.
The report URL will be added in the placeholder. Click on Add button to map the parameters. The filters of the child report are already populated as the parameters.
In the drilldown script, option has been given to pass the filter values present at the parent report or dashboard level to the child report. Also it is not only possible to pass the column on which we have clicked but also the other columns corresponding row value to the child report.
When we open the drilldown report and select a child report, we are able to pass all the columns in the table as well as the filter as a parameter in the parameter mapping section.
Map the columns that you want to pass to the child report. Here you can see the filter name of the child report and the name of the column value which you would like to pass to the child report.
Additionally, if you want to pass the values of the filter (you can pass only few filter values or all filter values)from the parent tabular report to the child report, you can select the filter name that you want to pass.
The columns are represented as “Column_” followed by column name and Filters as “Filter_” followed by the filter name as you can see in the above image.
If Filter_travel_details_travel_medium is mapped to the travel_medium filter of the child report, then the filter value present in the parent tabular report will get passed to the child report is passed. If Column_trave_detais_booking_platform is mapped to booking_platform filter of the child report then the value in of booking_platform in the row that is selected will be passed.
Click Ok after mapping all the parameters as needed. The Drilldown icon is highlighted. Click on the small tick to apply the customization.
You can see hyperlink in booking_platform column. Drilldown has been applied. On click you will see the parameters and respective values being passed in the URL.
When you click on a particular row, the child report opens. Here, the booking_platform (on which we clicked), the mode_of_payment column value in the corresponding row and the travel_medium filter values are passed in the URL.
The URL is in the below format:
%baseurl%/hi.html?dir=1602760507465&file=%filename%.report&mode=open&booking_platform=Website&mode_of_payment=[%22Cash%22,]&travel_medium=[%22Cab%22,]
For More Info, Contact us at demo@helicalinsight.com