Subreport element
Another template laid out in place. It shares this report’s datasets and filters them by its parameters.
- { type: subreport, template: ... }Example
Section titled “Example”title: Customers and their ordersculture: en-USdata: customers: { fields: { Id: int32, Name: string } } orders: { fields: { CustomerId: int32, Number: string, Total: decimal } }body: dataset: customers detail: - gap: 2pt content: - { type: text, value: "{Name}", fontWeight: bold } - { type: subreport, template: parts/customer-orders.report.yaml, parameters: { Customer: =Id }, width: 60% }# Used by subreport.report.yaml: one customer's orders.culture: en-USparameters: Customer: { type: int32 }data: orders: { fields: { CustomerId: int32, Number: string, Total: decimal } }body: filter: =CustomerId == Customer detail: - layout: row content: - { type: text, value: "{Number}" } - { type: text, value: "{Total:C}", align: end }data: customers: - { Id: 1, Name: Contoso Ltd } - { Id: 2, Name: Fabrikam Inc } orders: - { CustomerId: 1, Number: SO-1001, Total: 1250.00 } - { CustomerId: 1, Number: SO-1007, Total: 312.40 } - { CustomerId: 2, Number: SO-1003, Total: 480.50 }
Properties
Section titled “Properties”template
Section titled “template”Type: text · Required
Path of another template, resolved by the host.
parameters
Section titled “parameters”Type: names to expression
Values for the subreport’s parameters, by name: expressions over the current row.
It also has the properties of every element and the style properties.