Presenting data in reports may sometimes become challenging, especially when there are varied business analysis needs of people looking at these reports. While in certain cases, one needs to drill-down into specific layers of data to capture a more precise level of information. In other cases, there may be a need for drill-through to analyze detailed information passing from one report to another while still analyzing the same set of data.
In this blog, we'll create drill-through reports using a Tablix data region in ActiveReports.
The Need for Drill-through in the Tablix Data Region
In our earlier article, we created interactive drill-down reports with Tablix. Here, we see how a Project Manager can benefit from having just one report that shows data from different levels for budgeting purposes. Drill-down in the report enabled the user to show resource requirements/utilization data to the management team (for the requested periods or teams) on the fly.
Moving further with the budget planning, he was questioned by management for a significant increase in the resource demand for ‘Customer Relationship Management’ project.
To explain this better, the manager would require depicting project-wise data, highlighting the increase in resource needs - possibly through another report ‘Project Requirements’ report as shown below. Instead of switching between two separate reports while explaining to management, it would give seamless experience if he could simply navigate to this second report from the ‘Resource Planning and Utilization’ report based on the selected project.
Such a report can be easily designed using the Tablix data region. And to display the information related to a specific project based on selection, both these reports should be linked via Drill-through mechanism.
Let’s understand the basic procedure for the same.
Fundamentals of Drill-through in Tablix
Before creating Drill-through reports using Tablix data region, it is important to first identify and create two Tablix reports such that they can be categorized into
- Main report: displaying high-level information in Tablix data region such that the detailed information about its dimensions needs to be viewed in another report, and
- Drill-through report: displaying detailed information, related to the Main report, using Tablix.
Once these reports are identified/created, a drill-through link is to be added in the Tablix cell of the main report whose detailed information is present in the Drill-through report.
You can add a drill-through link only to the following controls/components in Page/RDL reports.
- TextBox control
- Image control
- Series in Chart control
- Components (Layer, Color Scale, etc.) in Map control
- Events in Calendar control
So, a Tablix cell must contain one of these controls for linking to another report.
Let’s understand this more by taking an example of the Winter Olympics. In this example, we want to show the medals won by different athletes of a specific country, as shown below.
In this case, we will be using 'WinterOlympics.rdlx' report as the Main report (that we created in the earlier blog) and link it to another report named WinterOlympics_Country.rdlx that we will be creating in the next section. This will be a Drill-through report for displaying the medals won by different athletes belonging to a specific country in different sports/events in different years.
Creation of the Drill-through report
Let’s now look at the different steps that are involved in creating this Drill-through report.
1. Data Binding
The report is bound to the 'WinterOlympics_Data.json' data file (attached in the blog).
2. Designing report layout using Tablix
Next, in the Tablix data region, expressions based on Discipline, Events, and Year data fields are specified in its row and column groups (as shown in the basic structure below).
Also, the list data region containing the TextBox bound to the ‘Athlete’ data field is embedded in the body cell of Tablix. This will display the list of athletes.
3. Filtering report data using a parameter
In this step, a report parameter is added with the default value set to “USA.” To retrieve the records based on a specific country, a filter is added in report dataset as shown in the image below.
After this, some visual improvements are made, and on previewing the report, the following output is shown:
Now, once have our Drill-through report ready, the next step is to add a drill-through link in the main report (WinterOlympics.rdlx) clicking on which Drill-through report will be displayed.
Linking to the Drill-through Report
A drill-through link can be added by specifying ‘Jump to report’ option to the name or path of Drill-through report in the ‘Action’ property of the control embedded in the Tablix cell. Additionally, the name and value of the parameters present in Drill-through report can be specified to view detailed information related to a specific value.
In the ‘WinterOlympics.rdlx’ report, a Drill-through link is added to the Image control named ‘Img_CountryFlag’ as depicted in the image below.
Once this is done, the country-specific details will be displayed (in WinterOlympics_Country.rdlx report) on clicking over the country flag (in WinterOlympics.rdlx report) as shown below.
Refer to the ActiveReports documentation for more details.
Download the data files:
If you have any questions about this tutorial, please leave us a comment. Additionally, if you have a request for a specific demo, be sure to leave a comment below!
Create an Interactive Drill-through Report with Tablix Download the latest version of ActiveReports today
Create an Interactive Drill-through Report with Tablix
Download the latest version of ActiveReports todayDownload Now!