How to use subform data in reports for report analysis
1. Perform report analysis on Subforms
「Form」And「Flow chart」The data submitted in「Report page」As a data source for further analysis;
When a subform exists in a form, additional processing is performed YIDA to support analysis.
The following describes a specific scenario (purchase order).
1.1 form design
Purchase Order design is as follows
「Purchase order」Below「Purchase order number」,「Purchase Date」,「Purchase subform」Three components
「Purchase subform」Below「Trade name」,「Incoming quantity」Two components
1.2 Relationship between forms and data sources in reports
- On the report page, you need to select a dataset, which is「Flow chart/form」. The column fields in the report dataset are the components in the form. (Due to the particularity of subform components, no mapping is performed)
- Subform components can accommodate other form components and can submit multiple pieces of data at a time.
- The subform component is a「Subtable」The subform component is independently mapped to an independent dataset in the report, named「Form name-subform name」(For example, the list of purchase orders)
After selecting the dataset, you need to select the column fields under the dataset (corresponding to the components in the form)
「Purchase order」Under the dataset, there are「Purchase order number」,「Purchase Date」Two column fields
「Purchase subform」Under the dataset, there are「Product Name」,「Incoming quantity」Two column fields
1.3 relationship between form data and report data
- Each data submitted by the form has a unique ID. The corresponding field in the report is「Instance ID」
- The data in the subform component is placed in the report.「Subform dataset」Next, all these data have a field「Parent instance ID」, the value is the ID of the current form instance.
Below「Purchase order」
First in「Purchase order」Submit two pieces of data, as shown in the following figure:
- In the report,「Purchase order」And「Purchase order-subform」The results of the two datasets are as follows:
The data of the purchase subform is placed in「Purchase order-purchase subform」In this report dataset, the parent instance ID is equal to the instance ID of the primary table.
2. Show form data and subform data together
In some business scenarios, form data and subform data need to be analyzed together. In this case, multi-table association can be used to implement
The data of the two tables should be linked together. You can use「Instance ID of the primary table = parent instance ID of the subform data」Associate
For example, to associate「Purchase order」And「Purchase order-purchase subform」The data of the two tables can be configured as follows:
- When you select a dataset, Select「Multi-table Association」;
- 「Data table"Select 「Purchase order」And「Purchase order-purchase subform」Two tables;
- Select「Add Association」, select the main table「Purchase order」, field selectionInstance ID 」; Select an associated table「Purchase order-purchase subform」, field selection「Parent instance ID」;
- Select the fields of the two tables;
2.1 Introduction to Association
The left Association is the outer Association, which displays all the data of Table A and Table B. The inner Association only displays the fields associated with table A and Table B.
(1) internal Association
The data on both sides is associated, and the intersection is taken. Only the data on both sides can be matched is displayed.
(2) left correlation
Data association between the two sides. The data in the left table shall prevail.
3. Precautions
3.1 neither the primary table nor the subtable can contain more than 1W pieces of data.
3.2 Aggregate queries use the associated fields of the primary and child tables for grouping. Therefore, aggregate queries must include associated fields as display fields.
3.3 2.0 report multi-table Association does not support the use of report formulas.
3.4 filter conditions/filter conditions can only be applied to the primary table.
3.5 you cannot use multi-select or check fields for associated fields.
3.6 subforms do not support report filtering. You can consider using intermediate tables to reach your request.
YIDA in order to better optimize the content and quality of YIDA user manual, it takes you 3-5 minutes to fill in the document feedback questionnaire. The document feedback questionnaire is submitted anonymously, and the questionnaire information is only used for YIDA document experience feedback collection. Thank you for your support for YIDA!
-------------------- Get the latest information YIDA, welcome to follow US--------------------