Link between subreport and Main Report

Source: Internet
Author: User

Normally, there is no data connection between subreports and primary reports.
The main purpose is to display several irrelevant data tables in one report.
However, in actual operations, the subreport must be associated with the main report in the following two cases:

1: A common grouping report (when the primary table and the detail table are associated). If only one primary report is used for display
If no data exists in the table, the data in the table cannot be displayed in the report due to association.
2: During grouping, You need to display multiple tables according to the master table in the details section.

You can use the link subreport to solve this problem.
In the following operations, I use a master table to correspond to the database files of two tables,
Complete the operation of grouping by the main table and display the content of the two tables in the details section.
The data in the primary table can be properly displayed.

The basic steps are as follows:
Start from the master table and make a report, grouped by "name"
Add the subreport R1 to display data in the book,
To filter data by name in the primary table, change the subreport connection and connect the field name of the primary report to stuname in the book.

Of course, you can connect to parameter fields instead of specific fields as needed, but not here.

Add subreport R2 to display data in class
To filter data by name in the main table, change the subreport connection and connect the field name in the main report to stuname2 in class.

To improve the appearance of reports, suppress unnecessary sections in subreports.
In addition, do not display the subreport table corresponding to the group data if there is no data.
You can set it as follows [see Figure].

Download the operation photo file here
============================================
Atai 20050601
20080311: Fixed image connection problems in this article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.