Reportingintermediate
BI Publisher Data Models and Sub-Templates
Understand advanced BI Publisher data model techniques including multiple data sets, bursting, and reusable sub-templates
Three capabilities turn BI Publisher from a report writer into something that handles real requirements: multiple data sets, bursting, and sub-templates.
Bursting is like a printing press that produces one big run of personalized letters and then automatically stuffs and addresses individual envelopes to each recipient, rather than a person collating and manually mailing each all letter one at a time. Sub-templates are like a company's standard letterhead stationery reused across every document type instead of redesigning the letterhead for each new form.
Key Concepts
1
Multiple data sets, linked. A data model can hold several named queries and join them hierarchically:
2
dataset "customers" SELECT customer_id, name FROM ...
dataset "invoices" SELECT customer_id, invoice_num, amount FROM ...
link: customers.customer_id -> invoices.customer_id3
The output XML is nested — each customer element containing its invoices — without a single join that
duplicates the customer columns across every invoice row.
4
The data sets can also come from different sources: a SQL query joined to a web service call, which is not
expressible as SQL at all.
5
Bursting splits one run into many documents. This is the capability worth understanding properly.
6
one execution of the invoice data model
| split by CUSTOMER_ID
v
customer A -> invoice_A.pdf -> emailed to a@x.com
customer B -> invoice_B.pdf -> emailed to b@y.com
customer C -> invoice_C.pdf -> printed7
A bursting definition is itself a query returning, per split key, the delivery method, the address, the
template and the format.
8
SELECT customer_id AS key,
'EMAIL' AS delivery_channel,
email_address AS parameter1,
'invoice_tmpl' AS template,
'PDF' AS output_format
FROM customers ...9
So delivery is data-driven. Adding a customer who wants their invoice by email rather than post is a row,
not a change to the report.
10
Without bursting, the alternative is submitting the report once per customer — five hundred concurrent
requests instead of one, and something has to orchestrate them.
11
Sub-templates are shared components. A letterhead, a footer with legal text, a formatting macro, defined
once and referenced:
12
<?import:xdoxsl:///Custom/common_header.xsb?>13
Forty reports share the company header. The address changes once.
14
Without them, a rebrand means editing forty templates and missing two.
15
The scenario to be ready for: emailing each customer their own invoice PDF from one report run. The
answer is bursting, and the detail that shows understanding is that the delivery information comes from a
query rather than being configured per recipient.
16
What the interviewer is probing.1. "What can a data model be built from?" Probing: breadth. Stalls: "SQL." Moves up: SQL
queries, PL/SQL ref cursors, web services, HTTP feeds and Excel — with multiple datasets linked into
a hierarchy.
17
2. "What is a sub-template for?" Probing: the reuse point. Stalls: "Nothing." Moves up:
shared layout fragments such as a letterhead or a common block, so a branding change is made once.
18
3. "Why link datasets rather than join in SQL?" Probing: the judgement. Stalls: "Never do
it." Moves up: for genuine master-detail where a join would multiply the parent rows — but one
query is usually faster when it fits.
19
4. "What does a bursting definition need?" Probing: the detail. Stalls: "Nothing." *Moves
up:* a query returning the split key, delivery method and template per group, which is how one run
emails each customer their own document.