Show data from multiple tables
In the process of building YIDA applications, you may encounter the following problems.
- In CRM system, how to associate customer clues, orders, and payment information with customer information and analyze data in reports
- In the student information management system, how to associate the basic information of students with the information of family members and analyze the data in the report
Prerequisites
This tutorial uses some basic functions of YIDA. You can first learn about the following functions.
Effect
The primary table is associated with the primary table.
The primary table is associated with a child table.
Implementation steps
The primary table is associated with the primary table.
Create a normal form page
Create a student information table common form page. For more information, seeCommon form.
Drag the following components into the canvas area.
- Serial Number: Named as student number
- Single line text: Named as name
- Single choice: Named gender
- Numerical value: Named age
- Subform: Named as a family member
- Single line text: Named as member name
- Single choice: Named as the relationship with students
Create a general form page for student achievement tables.
Drag the following components into the canvas area.
- Associated form: Named as name
- Associated Student Information Table
- Configure student number data padding
- Numerical value: Named as Chinese
- Numerical value: Named mathematics
- Numerical value: named English
- Grouping: name it a business field
- Single line text: Named as student number
- Group component status set to hidden
Create a View chart
Select a dataset.
Configure the dataset as follows.
- Select multi-table data
- Main data table: student information table
- Associated Data Table: Student Achievement table
- Association type: left Association
- Association
- Primary data table fields: student number
- Associated Data Table: Student Achievement table
- Field: student number
Select a field based on the actual data analysis requirements, rename the View chart, and save it.
Create report page
Create report page. For more information, seeCreate a report.
Drag the following components into the canvas area.
- Basic table
Configure reports page
Select a dataset and configure the table columns.
Select a dataset and configure filter criteria.
Save page
The primary table is associated with a child table.
Create a View chart
Select a dataset.
Configure the dataset as follows.
- Select multi-table data
- Main data table: student information table
- Associated Data Table: student information table. Family members
- Association type: left Association
- Association
- Primary data table fields: instance ID
- Associated Data Table: student information table. Family members
- Field: parent data id
Select a field based on the actual data analysis requirements, rename the View chart, and save it.
Create report page
Create report page. For more information, seeCreate a report.
Drag the following components into the canvas area.
- Basic table
Configure reports page
Select a dataset and configure the table columns.
Select a dataset and configure filter criteria.