- Crystal Reports - Discussion
- Crystal Reports - Useful Resources
- Crystal Reports - Quick Guide
- Crystal Reports - Data Export to CSV
- Crystal Reports - Data Export to HTML
- Crystal Reports - Data Export to XML
- Crystal Reports - Data Export to Excel
- Crystal Reports - Data Export Overview
- Crystal Subreports - Overview
- Crystal Reports - Edit Parameter Field
- Crystal Reports - Create Parameter Field
- Crystal Reports - Cascading Prompts
- Crystal Reports - Prompt Panels
- Crystal Reports - Filters
- Crystal Reports - Parameters
- Crystal Reports - Creating Arrays
- Crystal Reports - Creating Variables
- Crystal Reports - Conditional Formatting
- Crystal Reports - Applying Calculations
- Crystal Reports - If-Then-Else
- Crystal Reports - Apply Boolean Formulas
- Creating & Modifying Formulas
- Crystal Reports - Formula Workshop
- Crystal Reports - Defining Formulas
- Crystal Reports - Cross Tab Layout
- Crystal Reports - Charts
- Crystal Reports - Inserting Objects
- Crystal Reports - Templates
- Crystal Reports - Group Options
- Crystal Reports - Groups
- Crystal Reports - Delete Sections
- Crystal Reports - Sections
- Field Objects Controls & Modifications
- Crystal Reports - Time Based Filters
- Query Filters & Filter Conditions
- Crystal Reports - Queries
- Crystal Reports - Data Sources
- Crystal Reports - Design Environment
- Crystal Reports - Getting Help
- Crystal Reports - Page Layout
- Crystal Reports - Options
- Crystal Reports - GUI Navigation
- Crystal Reports - Overview
- Crystal Reports - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Crystal Subreports - Overview
Subreports allow you to combine unrelated reports into a single report. It is a report within a report. You can combine data that cannot be pnked and present different views of the same data in a single report.
Difference between Subreport and main report −
It is used as an element in the main report and cannot be used as single report.
A Subreport cannot contain other subreports.
It can be placed in any report section and the entire subreport will print in that section.
It doesn’t have page header or page footers sections.
Unpnked Subreports
Unpnked subreports are standalone reports and their data is not pnked to data in the main report. An unpnked subreport does not have to use the same data as the main report; it can use the same data source or a different data source entirely. Regardless of the underlying data sources, the reports are treated as unrelated.
Linked Subreports
Linked subreports use data that is coordinated with data in the main report. The program matches up the data in the subreport with data in the main report. If you create a main report with customer information and a subreport with order information and then pnk them, the program creates a subreport for each customer that includes all their orders.
Subreports can be pnked with data-passing pnks or with subreport filters.
Inserting Subreports
You can insert a new report or an existing report as subreport in a main report. The subreport has similar characteristics as the main report. The data source to be used in subreport must be similar to data source that is used in main report and it must also be located on the same BI repository. You can also choose a different source connection but it should have a field to pnk to main report.
A subreport can’t be inserted into another subreport. A subreport can be placed in any report section and the entire subreport will print in that section. However, a subreport cannot stand on its own. It is always inserted as an element into a main report.
Formatting Subreports
How to Insert a Subreport to a main report?
Go to Insert tab, cpck Subreport → The program displays an element frame.
Move the cursor to where you want it to appear in the report, and cpck to place it.
The Insert Subreport dialog box appears → Select create a new report → Type a name for the report in the Report Name text box. (You can also insert an existing subreport).
Option | Description |
---|---|
Use Main Report Data Source |
The Edit Query page appears |
Connect to a new Data Source |
The Choose a Data Source Connection dialog box appears Select a data source, and then cpck Next The Edit Query page appears |
Choose an option from the Data Connection area, and cpck ‘Next’. If you choose Use Main Report Data Source it will open Query panel to add objects in the report.
If you select connect to a new Data source, it will open New Data source connection window from which you can choose a new data source.
Once you choose new data source, you need to define the relationship between the main report and the subreport.
Once you cpck on ‘Next’ it will prompt you to choose a Sub Report type pke Detailed, Chart, Total, Custom.
Cpck on finish → it will show in the Structure of the main report. If you cpck on Page tab it will show the data of Subreport in the main report.
To insert an existing report as a subreport
On the Insert tab, cpck Subreport → The program displays an element frame.
Move the cursor to where you want it to appear in the report, and cpck to place it.
The Insert Subreport wizard appears → Select Use existing report, and then cpck Browse.
The Open dialog box appears → Select the report that you would pke to use, and then cpck Open → Cpck Next.
If the report you selected contains parameters, the Data Passing Links page appears.
Set up the appropriate pnks, and cpck ‘Next’. The Create Subreport Filters page appears → Create pnks between your main report and subreport by cpcking Add → Cpck Finish.
The report that you selected is added as a subreport.
To save a subreport as a main report
You can also save a subreport as a main report.
Right cpck on the subreport frame, and cpck Save Subreport As → Save As
Type a new name for the subreport → Cpck Save.
The subreport is saved as a main report and you can open it and use it.
Edit the properties of a subreport
You can edit the properties of a subreport after you have inserted it into your main report. To format subreports −
Right cpck on the subreport frame and cpck Format Subreport.
The Format dialog box appears → Edit the values.
For example, you can change the name of the subreport, edit the font, size, color, etc.
Cpck Close.
To combine two unrelated reports
Create the report you want to be printed first as the main report.
Create a new subreport.
Place the subreport into the Report Footer and it will print immediately after the main report.
Creating an on-demand subreport
On-demand subreports can be especially useful when you want to create a report that contains multiple subreports.
The difference between regular subreports and on-demand subreports is that the actual data of an on-demand subreport is not read from the data source until the user isolates it. This way only data for on-demand subreports that are actually viewed will be retrieved from the data source. This makes the subreports much more manageable.
To create an on-demand subreport: Place an ordinary subreport in your main report. Right cpck on the subreport, and cpck Format Subreport. Cpck the Subreport option, and select On Demand.
Advertisements