- Getting Started
- Administration Guide
-
User Guide
- An Introduction to Wyn Enterprise
- Document Portal for End Users
- Data Governance and Modeling
- Working with Resources
- Working with Reports
- Working with Dashboards
- View and Manage Documents
- Understanding Wyn Analytical Expressions
- Section 508 Compliance
- Subscribe to RSS Feed for Wyn Builds Site
- Developer Guide
Subreport
Use the Subreport control to embed the content of another report within a main report. This control allows you to modularize complex report designs, reuse existing reports, and display data from separate datasets or data sources within a single layout.
The Subreport control serves as a container for a separate report file, which is rendered within the main report. It is particularly useful when:
You want to reuse the same report in multiple parent reports.
You need to display related or detailed data from a different dataset or source.
You require separate filtering or formatting for specific sections of a report.
Note:
RDL and Page report types support Subreport control.
Ensure the subreport is published and accessible in the Wyn Document Portal before referencing it.
To minimize the use of subreports in data-heavy reports. Each subreport instance is rendered individually by the server, which may impact performance. For grouped data from the same dataset, use data regions, such as Tablix, instead.
Use Cases
Embedding order details in a customer invoice.
Reusing a predesigned summary section across multiple reports.
Displaying nested views with filtered data from different sources.
Design Guidelines
When working with subreports in Wyn:
Preview behavior: If the subreport is modified, re-preview or refresh the main report to reflect changes.
File location: The subreport must be published to the Wyn server and accessible by its name or path.
Borders: Borders applied to both the subreport container and the embedded report are rendered separately.
Empty data: If the subreport returns no rows, only the subreport container is rendered (with or without its border).
Working with Parameters
You can pass dynamic values from the main report to the subreport using parameters. This is useful when filtering the subreport’s data based on the current row context or grouping.
The parameter name must match exactly with the name of the parameter defined in the subreport.
The parameter value can be an expression or a field from the parent dataset.
Properties Tab
You can customize the subreport control by setting properties in the Properties tab. Properties like selecting the child report, passing parameters, setting borders, dimensions, style, visibility, and other options can be customized.
Listed below are the common properties:
Property | Description |
---|---|
Common | - Name: Sets the name of the selected textbox. - Value: Sets the data to be displayed in the textbox. You can enter text directly, or click to select a field, add an expression, and so on. |
Action | - Type: Sets the action to be taken when clicking on the text in the textbox. Options include: - None: No action. - Apply Parameters: Re-renders the report with new parameters. You can add a parameter and choose an action type: - Set: Assign a value to a parameter. - Toggle: Add or remove a value from a multi-value parameter. - Reset: Reset the parameter to its default value. - Jump to Report: Link to another report. - Jump to Bookmark: Jump within the current report. - Jump to URL: Open an external web page. |
Background | - Color: Sets the background color of the textbox. - Image: Sets a background image. Sources include Shared, Embedded, or Database. - Image Properties: - Source: Source of the image. - Value: Selected image from the source. - MIME Type: Format (PNG, GIF, etc.). - Repeat: Image repetition options: Repeat, NoRepeat, RepeatX, RepeatY. |
Border | - Width: Sets the border thickness. - Style: Sets the border style. - Color: Sets the border color. |
Text | Sets text formatting: font color, family, size, style, weight, decoration, alignment, justification, vertical alignment, word wrap, line spacing, character spacing, data format, rotation angle, font adaptation, and font-weight ratio. |
Dimensions | - Left: Distance from the left edge of the container. - Top: Distance from the top edge of the container. - Width: Width of the textbox. - Height: Height of the textbox. |
Layout | - Style: Sets the theme of the textbox. - Padding: Space between content and border: Top, Left, Right, Bottom. - Layer Name: Assigns a report layer. - Keep Together: Prevents splitting content across pages. - Can Grow: Expands height based on content. - Can Shrink: Shrinks height when the content is less. - Z-Index: Controls stacking order of overlapping textboxes. |
Visibility | - Hidden: Hides the textbox in preview. - Toggle Item: Another item can toggle visibility. - Initial Toggle State: Default display state (Collapsed = hidden, Expanded = shown). |
Data | - Element Name: Name used in XML output. - Element Output: Auto, Output, or NoOutput for XML export. - Element Style: Auto, AttributeNormal, or ElementNormal for XML rendering. |
User Sort | - Sort Expression: Expression used to sort data. - Sort Target: Data region to apply the sorting; default is current scope. |
International | Sets calendar, writing direction (LTR/RTL), language, writing mode, and other international formats. |
Misc Options | - Tooltip: Text displayed on hover. - Label: Display text for report catalog/TOC. - Bookmark: Text or expression used as a jump anchor. - Heading Level: Heading level in TOC. |
Best Practices
Use subreports for modular, reusable sections of a report.
Test and preview subreports independently before embedding.
Limit subreport nesting, especially in large data reports.
Ensure consistent styling by enabling the use of the parent report's theme and stylesheet.
For a detailed, step-by-step guide with screenshots and additional configuration options, refer to the official Wyn documentation: Master-Detail Report using Subreport.