Turning Flat Reports Into Structured Views
A flat list of 500 orders is hard to scan. Add a control break on Department and suddenly the report is organized into clear sections with headers, making it easy to find all orders for a specific department. Control breaks are one of the most underused IR features that users and developers should leverage more.
Adding a Control Break
Users add control breaks through Actions, then Format, then Control Break. Select the column to break on and click Apply. The report reorganizes to show a header row for each distinct value of that column, with the matching rows underneath.
Multiple Control Breaks
You can have nested control breaks: break on Region, then within each region break on Department. This creates a hierarchical view with two levels of grouping. The order matters: the first break is the outer group, the second is the inner group. Keep nesting to two levels maximum for readability.
Control Breaks With Aggregates
The real power comes when you combine control breaks with aggregates. With a control break on Department and a Sum aggregate on Salary, each department section shows its subtotal and the report shows a grand total at the bottom. This creates a summary report that would otherwise require GROUP BY queries and custom formatting.
Pre-Configured Control Breaks
Create an alternative default report with a pre-configured control break. Run the page, add the control break, optionally add aggregates, then save as an alternative default report named “By Department.” Users see this as a tab they can click for an instant grouped view.
Sorting and Control Breaks
Control breaks automatically sort the report by the break column. If you also want secondary sorting within each group (e.g., by order date descending within each department), add the secondary sort after setting the control break. The sort and break work together to create a well-organized grouped and sorted report.
Styling Control Break Headers
Control break headers use the IR’s built-in styling which is clean but basic. For more visual emphasis, add CSS to the page that targets the control break header class:
.a-IRR-controlBreakHeader {
background-color: #f0f4f7;
font-size: 1.1em;
font-weight: bold;
padding: 8px 12px;
border-top: 2px solid #0572CE;
}