Pagination and totals
Plan physical pages before adding fields
Page size, margins, header, footer and body width determine the printable area. A group is a logical set of rows, not necessarily a physical page. A detail row repeats for each dataset record. Set a group break between invoices when each invoice must start on its own page. A long invoice may still span pages. PDF and print use physical page boundaries; HTML and Excel may paginate differently.
Expressions and aggregate scope
Report Builder expressions begin with = and use Visual Basic expression syntax, not DAX. On the detail row use =Fields!LineCents.Value / 100D and a currency format. In the InvoiceID group footer use =Sum(Fields!LineCents.Value, "InvoiceGroup") / 100D where InvoiceGroup is the actual row-group name. Outside the group use =Sum(Fields!LineCents.Value, "InvoiceRows") / 100D for the whole dataset. Keep amounts numeric until rendering. These snippets assume a dataset field named LineCents and group named InvoiceGroup. The fixture stores integer cents, avoiding float rounding. Group totals are not the same as page subtotals.
Example 1 — calculate a layout budget
Use a Letter portrait page 8.5 × 11 inches with 0.5-inch margins, 0.75-inch page header and 0.75-inch footer. Available width is 7.5 inches, body height is 8.5 inches before body items. The proposed tablix is 7.2 inches wide. Reserve 1.0 inch for repeated invoice/column headings and 1.1 inches for totals and whitespace; use fixed 0.8-inch detail rows for the simplified model. Floor((8.5 - 2.1)/0.8) = 8 rows per page. Nine I100 lines require two planned pages (8 + 1), and two I101 lines fit on one. This is a conservative layout budget, not an actual render or guarantee; CanGrow, wrapping, whitespace, KeepTogether and other renderer behavior can alter pagination.
Example 2 — reconcile invoice and month-end totals
I100 lines are $10, $20, $30, $40, $10, $20, $15, $25 and $10. The first eight sum to $170; the final line is $10. The invoice group footer must show $180 once at group end, not repeat $180 as a page subtotal. I101 is $50 + $25 = $75. A separate month-end summary dataset aggregates each invoice and shows $255 total for February. Add a page footer expression =Globals!PageNumber & " of " & Globals!TotalPages for the report. Choose whether page numbers reset; this lab uses continuous numbering. For row headers configure the appropriate static tablix member RepeatOnNewPage and KeepWithGroup; inspect repeated headings in native output.
Avoid blank pages and duplicated totals
Ensure body width including every item edge plus both margins fits page width. A 7.6-inch body with 1 inch of total margins exceeds 8.5 inches. KeepTogether is a layout preference, not a guarantee when a group exceeds a page. Do not rely on exact page counts when text can grow; long descriptions and font metrics can force an extra page. A month-end total must sum each detail amount once. Summing a repeated invoice total on every line multiplies it by line count. Keep group totals in group footers and use a separate summary report to avoid confusing invoice totals with month totals.
Practice — revise the design
Change body width to 7.6 inches and row height to 0.9 inches, leaving other assumptions unchanged. Determine horizontal fit, planned rows per page, and planned pages for I100. Explain why this is not native evidence. Hint 1: compare widths including margins. Hint 2: use floor for row capacity, then ceiling for page count.
Documentation search extracts checked 2026-11-29; installed version and native execution NOT RUN.
- https://learn.microsoft.com/en-us/power-bi/paginated-reports/paginated-reports-pagination
- https://learn.microsoft.com/en-us/power-bi/paginated-reports/report-design/page-layout-rendering-report-builder-service
- https://learn.microsoft.com/en-us/sql/reporting-services/report-design/controlling-the-tablix-data-region-display-on-a-report-page?view=sql-server-ver17
- https://learn.microsoft.com/en-us/power-bi/paginated-reports/report-builder-expression-examples
- https://learn.microsoft.com/en-us/sql/reporting-services/report-design/page-headers-and-footers-report-builder-and-ssrs?view=sql-server-ver17