Report template generation method and related device
By independently designing row header tables and column header tables during report template generation, and storing row and column numbers and dimension member information, the problems of low generation efficiency and table appearance impact in existing technologies are solved. This achieves efficient generation without affecting the original table appearance and position, resulting in a WYSIWYG effect.
Patent Information
- Application Number
- CN202411868522.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Existing report template generation methods are inefficient because each data cell needs to store multi-dimensional information, and they can easily affect the original table format information and the position of data cells.
Design separate row header tables and column header tables outside the data area table to store row and column numbers and corresponding dimension member information. Generate report templates by linking the row header tables and column header tables with the data area table, avoiding the need to set multi-dimensional information for each data cell individually.
It improves the efficiency of report template generation, ensures that the original table information is not destroyed and the data cell position is not offset, achieves a WYSIWYG effect, and saves storage space and computing resources.
Smart Images

Figure CN119808744B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of report template generation, and more specifically, to a method for generating report templates, an apparatus for generating report templates, a computer device, a computer-readable storage medium, and a computer program product containing instructions. Background Technology
[0002] As business complexity and data volume increase, traditional reporting needs are becoming more diverse and sophisticated, which poses a challenge to report template design, as old methods are struggling to meet the need for rapidly generating and managing complex dimensional data.
[0003] The existing method for generating report templates involves storing multi-dimensional information in each data cell of the actual data area within a two-dimensional plane, and then generating the report template based on this multi-dimensional information. For example, if a report involves three dimensions (time, location, and category), then each data cell in the actual data area needs to store the dimensional information for time, location, and category.
[0004] However, the existing methods for generating report templates require storing dimensional information for all dimensions in each data cell. Setting multi-dimensional information for each data cell requires storing a lot of information and is inefficient. Therefore, the efficiency of generating report templates is low. Summary of the Invention
[0005] This application provides a method for generating report templates, a device for generating report templates, a computer device, a computer-readable storage medium, and a computer program product containing instructions, which can generate report templates while improving the efficiency of report template generation.
[0006] In a first aspect, embodiments of this application provide a method for generating a report template, including:
[0007] The report template customization interface is displayed. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and the column header table are areas located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table.
[0008] Based on the first target data region selected in the data region table, a first target row header region corresponding to the first row number of the first target data region is determined in the row header table, and a first target column header region corresponding to the first column number of the first target data region is determined in the column header table.
[0009] After determining the target dimension information of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column dimension cell in the first target column header region, the first target row and column dimension combination of the target dimension information of the Mth row and the target dimension information of the Nth column is obtained by combining the target dimension information of the Mth row and the target dimension information of the Nth column.
[0010] The first target report template is generated based on the first target data area and the first target row and column dimensions of each first data cell in the first target data area.
[0011] Secondly, embodiments of this application provide a report template generation apparatus, including:
[0012] The display unit is used to display the report template customization interface. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and the column header table are located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table.
[0013] The determining unit is configured to, based on the first target data region selected in the data region table, determine a first target row header region in the row header table whose row number corresponds to the first row number of the first target data region, and determine a first target column header region in the column header table whose column number corresponds to the first column number of the first target data region;
[0014] The unit is used to determine the target dimension information of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column dimension cell in the first target column header region, and then combine the target dimension information of the Mth row and the target dimension information of the Nth column to obtain the first target row and column dimension combination of the data cell of the Mth row and Nth column in the first target data region.
[0015] The generation unit is used to generate a first target report template based on the first target data region and the first target row and column dimensions of each first data cell in the first target data region.
[0016] Thirdly, embodiments of this application provide a computer device, including:
[0017] Central processing unit, memory, input / output interfaces, wired or wireless network interfaces, and power supply;
[0018] The memory can be either temporary or permanent storage.
[0019] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the aforementioned report template generation method.
[0020] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the aforementioned method for generating a report template.
[0021] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute the aforementioned method for generating report templates.
[0022] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: Row header tables and column header tables can be designed independently in areas outside the data area table. Row dimension member information is stored in the row header table, and column dimension member information is stored in the column header table. Only the row and column numbers and their corresponding dimension member information need to be stored. The amount of information stored when setting multi-dimensional information for each data cell is small, and the efficiency of setting multi-dimensional information for each data cell is high. Therefore, the report template generation efficiency is high. Furthermore, the independence of the row header table and column header table from the data area table, and the linked layout design of the row header table, column header table, and data area table, ensures that the generation of the report template will not affect the original main table's table layout information, avoiding damage to the original table layout information and data cell position offsets. It also eliminates the need for various offset calculations for each data cell, resulting in high efficiency in setting multi-dimensional information for each data cell. Therefore, a WYSIWYG effect can be achieved, further improving the report template generation efficiency. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the architecture of a report template generation system disclosed in an embodiment of this application;
[0024] Figure 2 This is a flowchart illustrating a method for generating a report template as disclosed in an embodiment of this application;
[0025] Figure 2-1 This is a schematic diagram of a report template customization interface disclosed in an embodiment of this application;
[0026] Figure 2-2 A schematic diagram of a customizable interface for a report template, as disclosed in the prior art;
[0027] Figure 2-3 A schematic diagram of another customizable interface for a report template disclosed in the prior art;
[0028] Figure 2-4 A schematic diagram of a report template disclosed in the prior art;
[0029] Figure 3 This is a schematic diagram illustrating the process of generating another report template disclosed in an embodiment of this application;
[0030] Figure 3-1 This is a schematic diagram illustrating the synchronous selection of display mode in a report template customization interface disclosed in an embodiment of this application;
[0031] Figure 3-2 This is a schematic diagram of a report template disclosed in an embodiment of this application;
[0032] Figure 3-3 This is a schematic diagram of a target report disclosed in an embodiment of this application;
[0033] Figure 4 This is a schematic diagram illustrating the process of generating another report template disclosed in an embodiment of this application;
[0034] Figure 5 This is a schematic diagram illustrating the process of generating another report template disclosed in an embodiment of this application;
[0035] Figure 6 This is a schematic diagram of the structure of a report template generation device disclosed in an embodiment of this application;
[0036] Figure 7 This is a schematic diagram of the structure of a computer device disclosed in an embodiment of this application. Detailed Implementation
[0037] This application provides a method for generating report templates, a device for generating report templates, a computer device, a computer-readable storage medium, and a computer program product containing instructions, which can generate report templates while improving the efficiency of report template generation.
[0038] This application can be applied to various information management systems, such as Enterprise Resource Planning (ERP), tax systems, financial systems, human resource systems, and supply chain systems.
[0039] Please see Figure 1 The architecture of the report template generation system 100 in this application embodiment includes:
[0040] The system comprises a computer device (device for generating report templates) 101 and a client (user) 102. When generating a report template, the computer device 101 can connect to the client 102. The computer device 101 can receive a report template generation request sent by the client 102, display a customizable report template interface, determine the first target row header area in the row header table and the first target column header area in the column header table based on the first target data area selected in the data area table, and then combine the target dimension information of the Mth row and the target dimension information of the Nth column to obtain the first target row and column dimension combination of the data cell in the Mth row and Nth column of the first target data area. Based on the first target data area and the first target row and column dimension combination of each first data cell in the first target data area, the computer device 101 generates a first target report template and returns the first target report template to the client 102.
[0041] based on Figure 1 For the system that generates the report template shown, please refer to [link / reference]. Figure 2 , Figure 2 This is a flowchart illustrating a method for generating a report template disclosed in an embodiment of this application. The method includes:
[0042] 201. Display the report template customization interface. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and column header table are areas located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table.
[0043] In this embodiment, when generating a report template, a report template customization interface can be displayed. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and column header table are located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table.
[0044] Specifically, "the row numbers of the data range table correspond to the row numbers of the row header table" can mean "the row numbers of the data range table and the row numbers of the row header table are equal (the same)" or "the row numbers of the data range table and the row numbers of the row header table are not equal, but there is a logical association and mapping relationship between the row numbers of the two". The understanding of "corresponding" in "the column numbers of the data range table correspond to the column numbers of the column header table" is similar to the understanding of "corresponding" in "the row numbers of the data range table correspond to the row numbers of the row header table", and will not be elaborated here.
[0045] For more details, please refer to Figure 2-1 , Figure 2-1 This is a schematic diagram of a report template customization interface disclosed in an embodiment of this application. Figure 2-1As can be seen, the row header table is the area above the data area table, and the column header table is the area to the left of the data area table. The data area table and the row header table have the same row numbers, and for the same row number, the data in the data area table corresponds one-to-one with the data in the row header table. The data area table and the column header table have the same column numbers, and for the same column number, the data in the data area table corresponds one-to-one with the data in the column header table.
[0046] It is understandable that the row header table can be located not only above the data range table, but also below it; the column header table can be located not only to the left of the data range table, but also to the right. The row header table and column header table can also be located in other reasonable areas outside the data range table, but this is not specifically limited here.
[0047] 202. Based on the first target data region selected in the data region table, determine the first target row header region in the row header table that corresponds to the first row number of the first target data region, and determine the first target column header region in the column header table that corresponds to the first column number of the first target data region.
[0048] After displaying the report template customization interface, you can determine the first target row header area corresponding to the first row number of the first target data area in the row header table, and the first target column header area corresponding to the first column number of the first target data area in the column header table, based on the first target data area selected in the data area table.
[0049] Specifically, the understanding of "corresponding" in "determining the first target row header area corresponding to the first row number of the first target data area in the row header table" and "determining the first target column header area corresponding to the first column number of the first target data area in the column header table" is similar to the understanding of "corresponding" in "the row number of the data area table corresponds to the row number of the row header table", and will not be elaborated here.
[0050] For more details, please refer to [link / reference]. Figure 2-1 ,Depend on Figure 2-1 It can be seen that after selecting the first target data range (F7:L13) in the data range table, that is, the range of data cells from the 7th row of column F to the 13th row of column L, the first target row header range can be determined in the row header table as the range of row header cells from row 7 to row 13, and the first target column header range can be determined in the column header table as the range of column header cells from column F to column L.
[0051] 203. After determining the target dimension information of the Mth row dimension cell in the first target row header area and the target dimension information of the Nth column dimension cell in the first target column header area, combine the target dimension information of the Mth row and the target dimension information of the Nth column to obtain the first target row and column dimension combination of the data cell in the Mth row and Nth column of the first target data area.
[0052] Based on the first target data area, after determining the first target row header area in the row header table and the first target column header area in the column header table, the target dimension information of the Mth row dimension cell of the first target row header area and the target dimension information of the Nth column dimension cell of the first target column header area can be determined. Then, the first target row and column dimension combination of the target dimension information of the Mth row and the Nth column can be obtained by combining the target dimension information of the Mth row and the target dimension information of the Nth column.
[0053] For details, please continue reading. Figure 2-1 ,Depend on Figure 2-1 For example, we can determine the target dimension information "Subject A, Budget Amount" (involving "Subject" dimension members and "Data Type" dimension members) in the 7th row dimension cell of the first target row header area, and the target dimension information "Year 2024, January" (involving "Fiscal Year" dimension members and "Period" dimension members) in the Fth column dimension cell of the first target column header area. Then, by combining the target dimension information "Subject A, Budget Amount" in the 7th row and the target dimension information "Year 2024, January" in the Fth column, we can obtain the first target row and column dimension combination "Subject A, Budget Amount, Year 2024, January" in the data cell of the 7th row and Fth column of the first target data area.
[0054] Specifically, this embodiment only needs to store the row number and the corresponding dimension member information. It does not need to store the combination of dimension member information for each data cell (row and column dimension combination). For example, the dimension members corresponding to row number 7 are "Subject A" and "Budget Information", which can be stored as codes, such as: row7 = (AcctA, Budget). The column storage information is similar to that of the rows, such as column6 = (Y2024, M01). It is understood that in addition to the storage structure of the dimension members set in the row / column header table described above, other reasonable storage structures are also possible, which are not limited here.
[0055] It's important to understand that for an existing report template generation method (where each data cell needs to store complete row and column dimension combination information), please refer to [link / reference needed]. Figure 2-2 , Figure 2-2 This is a schematic diagram of a customizable interface for a report template disclosed in the prior art. Figure 2-2As can be seen, in existing report template generation methods, each data cell needs to store the dimension information of all dimensions. For example, each data cell needs to contain 4 dimension member information. Assuming that the storage space for each dimension member information occupies 1 storage unit, the existing report template generation method needs 100*4=400 storage units to store the table information of 10*10=100 cells. However, the embodiment of this application can store only the row and column numbers and the corresponding dimension member information. The embodiment of this application only needs to store information in the row / column header table, which only requires 10*2+10*2=40 storage units.
[0056] It is worth mentioning that, in this embodiment, only the row and column numbers and the corresponding dimension member information can be stored. The row and column dimension combination information corresponding to the row and column intersection is the complete dimension combination information. This can accurately map the position information of the dimension members in the storage structure to the position information of the data cells. While ensuring the accuracy of the mapping, the information storage density is greatly improved, less information needs to be stored, and information storage space is saved, thereby improving the efficiency of report template generation.
[0057] It is also worth mentioning that, in the process of setting the report template area, this application introduces independent row header and column header tables for auxiliary settings. By using the extra space (row / column header table) to perform multi-dimensional spatial mapping within a data cell of the original table (data area table), it is possible to set the multiple dimensions of a data cell at once within the same plane space. This avoids the cumbersome process of individually calling up and setting the multi-dimensional members within a data cell in the existing report template generation method (i.e., each multi-dimensional element needs to be processed separately on the interface). This improves the efficiency of determining the target row and column dimension combination of each data cell in the target data area, thereby improving the efficiency of report template generation.
[0058] It is also worth mentioning that the method of additionally setting the column / row header table in this embodiment of the application ensures that changes to the settings interface will not affect the original table layout information, and can also prevent the original table layout information from being destroyed or the data cell position from shifting, thereby achieving a WYSIWYG effect. Please refer to the following for details. Figure 2-3 , Figure 2-3 This is a schematic diagram of another customizable report template interface disclosed in the prior art (which has a cell position offset issue), provided by... Figure 2-3 As can be seen, although the row / column header area can be expanded within the original data area (the area within the data area table) (green cells), and the data dimension member information can be stored in the expanded cells, the final generated report template is not the same as the report template set for preview; the data cell positions have shifted. Please refer to [link / reference] for details. Figure 2-4 , Figure 2-4This is a schematic diagram of a report template disclosed in the prior art (which has a cell position offset problem), by... Figure 2-4 It is known that the data cell positions have shifted, and the original table format has been corrupted, leading to errors in data retrieval during actual report processing. For example, errors may occur when setting Excel formulas containing positional information. If the template is set to retrieve the value of a specific cell using an Excel formula, the cell position may shift due to row and column insertions, resulting in errors in data retrieval during actual report processing. To ensure accuracy in actual report data retrieval, existing technologies may require additional calculations of various offset positions when determining the target row and column dimension combination for each data cell in the target data area. However, this leads to low efficiency in determining the target row and column dimension combination for each data cell, resulting in low report template generation efficiency. In summary, this application embodiment generates report templates by additionally setting column / row header tables. Changes to the settings interface will not affect the original main table's format information, avoiding corruption of the original format information and data cell position shifts. This achieves a WYSIWYG effect and improves the efficiency of report template generation.
[0059] 204. Generate a first target report template based on the first target data area and the first target row and column dimensions of each first data cell in the first target data area.
[0060] After combining the target dimension information of row M and column N to obtain the first target row and column dimension combination of the data cell in row M and column N of the first target data area, the first target report template can be generated based on the first target data area and the first target row and column dimension combination of each first data cell in the first target data area.
[0061] Specifically, a first target report template can be generated based on the first target data area (F7:L13) and the first target row and column dimension combination of each first data cell in the first target data area. When a trigger signal for generating a first target report based on the first target report template is detected, the first target data corresponding to the first target row and column dimension combination of each first data cell can be obtained and displayed in each first data cell. For example, the first target data corresponding to the first target row and column dimension combination "Subject A, Budget Amount, 2024, January" in the data cell of row 7 and column F is 700 (yuan), etc., thereby obtaining the first target report.
[0062] After generating the first target report template, when a trigger signal for generating the first target report based on the first target report template is detected, the first target data corresponding to the first target row and column dimension combination of each first data cell can be obtained and displayed in each first data cell to obtain the first target report.
[0063] Specifically, when a trigger signal for generating a first target report based on a first target report template is detected, the first target row and column dimension combination of each first data cell can be parsed. That is, the format of the first target row and column dimension combination of each first data cell is converted to obtain the first target row and column dimension combination of the target format (the format used to retrieve data from the data source) of each first data cell. Then, based on the first target row and column dimension combination of the target format of each first data cell, the first target data corresponding to the first target row and column dimension combination of each first data cell is obtained and displayed in each first data cell to obtain the first target report.
[0064] It is worth mentioning that, in this embodiment, only the row and column numbers and the corresponding dimension member information need to be stored. When setting the multi-dimensional information of each data cell, less information needs to be stored. Therefore, the computational cost required to parse the first target row and column dimension combination of each first data cell is low, which can save resources.
[0065] In this embodiment, row header tables and column header tables can be designed independently in areas outside the data area table. Row dimension member information is stored in the row header table, and column dimension member information is stored in the column header table. Only the row and column numbers and their corresponding dimension member information can be stored. When setting multi-dimensional information for each data cell, less information needs to be stored, and the efficiency of setting multi-dimensional information for each data cell is high. Therefore, the generation efficiency of the report template is high. Furthermore, the row header table and column header table are independent of the data area table, and the design of the linked layout of the row header table, column header table and data area table (i.e., "the row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table", and "based on the first target data area selected in the data area table, the row number in the row header table corresponds to the first row number of the first target data area, and the column number in the column header table corresponds to the first column number of the first target data area") ensures that the generation of the report template will not affect the table layout information of the original main table, avoiding the destruction of the original table layout information and the offset of data cell positions. It also eliminates the need to perform various offset calculations for each data cell, making the setting of multi-dimensional information for each data cell more efficient. Therefore, a WYSIWYG effect can be achieved, further improving the generation efficiency of the report template. Secondly, only the row and column numbers and their corresponding dimension member information can be stored. When setting multi-dimensional information for each data cell, less information needs to be stored. Therefore, the computational cost required to parse the first target row and column dimension combination of each first data cell is low, which can save resources.
[0066] based on Figure 2Based on the corresponding embodiment, in order to improve the efficiency of determining the target dimension information of the Mth row and the target dimension information of the Nth column, and thus further improve the efficiency of report template generation, the information can be determined through the row and column dimension configuration interface, or by the user directly entering the information in the Mth row dimension cell of the first target row header area and the Nth column dimension cell of the first target column header area. For specific implementation methods, please refer to the following descriptions:
[0067] The method for determining the target dimension information of the Mth row of the Mth row dimension cell in the first target row header area and the target dimension information of the Nth column of the Nth column dimension cell in the first target column header area can be as follows: if a trigger signal for configuring the row dimension of the first target row header area and configuring the column dimension of the target column header area is detected, the row and column dimension configuration interface is first displayed, which includes at least one preset row dimension and at least one preset column dimension. Then, at least one target row dimension and at least one target column dimension selected by the user in the at least one preset row dimension and at least one preset column dimension are obtained, and the target dimension information of the Mth row and the target dimension information of the Nth column are determined based on the at least one target row dimension and at least one target column dimension.
[0068] Specifically, preset row dimensions and preset column dimensions can be determined by the original table template entered by the user in the data area table (including but not limited to textual descriptions such as table name, row / column header information, background color fill, and company graphic logo). For example, if the user enters the original table template as "Subject A, Subject B, Subject C, January, February, March, 2024, 2024, 2024...", then dimension members of "Subject", "Period", and "Fiscal Year" can be generated. Preset row dimensions and preset column dimensions can also be determined based on the required or commonly used row and column dimensions involved in historical report templates, or through other reasonable methods, which are not limited here.
[0069] The method for determining the target dimension information of the Mth row of the Mth dimension cell in the first target row header area and the target dimension information of the Nth column of the Nth dimension cell in the first target column header area can also be to obtain the target dimension information of the Mth row entered by the user in the Mth dimension cell of the first target row header area and the target dimension information of the Nth column entered by the user in the Nth column of the first target column header area.
[0070] Specifically, users can directly enter "Subject A" in the Mth row dimension cell of the first target row header area as the Mth row target dimension information, and directly enter "2024, January" in the Nth column dimension cell of the first target column header area as the Nth column target dimension information.
[0071] It is understandable that, in addition to the methods described above for determining the target dimension information of the Mth row and the target dimension information of the Nth column, other reasonable methods may also be used, which are not limited here.
[0072] It is worth mentioning that by configuring the row and column dimensions through the interface, or by having the user directly enter information in the Mth row dimension cell of the first target row header area and the Nth column dimension cell of the first target column header area, the efficiency of determining the Mth row target dimension information and the Nth column target dimension information can be improved, thereby further improving the efficiency of report template generation.
[0073] based on Figure 2 The described embodiment, while requiring less stored information when setting multi-dimensional information for each data cell during report template generation, and featuring a WYSIWYG layout where row header and column header tables are independent of the data area table and linked to the data area table, further improves report template generation efficiency by achieving a WYSIWYG effect, still frequently suffers from low efficiency in determining the target dimension information for the Mth row and the Nth column, resulting in low report template generation efficiency. To address this issue, a detailed embodiment of this solution, which can be selectively implemented during execution, is provided below. Please refer to [link to detailed embodiment]. Figure 3 , Figure 3 This is a schematic diagram illustrating another process for generating a report template as disclosed in an embodiment of this application. Another embodiment of the report template generation method of this application includes:
[0074] 301. Display the report template customization interface. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and column header table are located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table. The row header table is located to the left or right of the data area table, and the column header table is located above or below the data area table.
[0075] Step 301 in this embodiment is the same as described above. Figure 2 Step 201 in the illustrated embodiment is similar and will not be repeated here.
[0076] For details, please refer to Figure 3-1 , Figure 3-1 This is a schematic diagram illustrating the synchronous selection of display mode in a report template customization interface disclosed in this application. Figure 3-1 As can be seen, the row header table is located to the left of the data area table, and the column header table is located above the data area table.
[0077] 302. Based on the first target data region selected in the data region table, determine the first target row header region in the row header table that corresponds to the first row number of the first target data region, and determine the first target column header region in the column header table that corresponds to the first column number of the first target data region.
[0078] Step 302 in this embodiment is the same as described above. Figure 2 Step 202 in the illustrated embodiment is similar and will not be repeated here.
[0079] 303. Based on the data cell in row M and column N selected in the first target data area, simultaneously select and display the dimension cell in row M in the first target row header area and the dimension cell in column N in the first target column header area. Obtain the dimension information in row M and column N determined by the user from the dimension cells in row M and column N that are selected and displayed simultaneously.
[0080] For details, please continue reading. Figure 3-1 ,Depend on Figure 3-1 It can be seen that when the data cell in the 7th row and the Fth column is selected, the 7th row dimension cell can be selected and displayed simultaneously in the first target row header area, and the Fth column dimension cell can be selected and displayed simultaneously in the first target column header area.
[0081] It is worth mentioning that the row header table and column header table can be tiled. This tiling method can achieve dynamic linkage of selecting and displaying data cells, row dimension cells and column dimension cells simultaneously. By storing dimension member information in a dynamic linkage manner, the efficiency of determining the target dimension information of the Mth row and the target dimension information of the Nth column can be improved, thereby further improving the efficiency of report template generation.
[0082] 304. Combine the target dimension information of row M and column N to obtain the first target row and column dimension combination of the data cell in row M and column N of the first target data area.
[0083] 305. Generate a first target report template based on the first target data area and the first target row and column dimensions of each first data cell in the first target data area.
[0084] Steps 304 to 305 in this embodiment are the same as those described above. Figure 2 The steps involved in steps 203 to 204 in the illustrated embodiment are similar and will not be repeated here.
[0085] For details, please refer to Figure 3-2 , Figure 3-2 This is a schematic diagram of a report template disclosed in an embodiment of this application. Figure 3-2As can be seen, when setting the multi-dimensional information of a data cell (e.g., triggered by clicking the "Save and Return" button), the auxiliary row header table and column header table can be collapsed, and the positional mapping relationship of each data cell (multi-dimensional information, i.e., multi-dimensional member combination) can be saved. For details, please refer to [link to relevant documentation]. Figure 3-3 , Figure 3-3 This is a schematic diagram of a target report disclosed in an embodiment of this application, by... Figure 3-3 As can be seen, when displaying the target report, the data corresponding to the multi-dimensional member combination of each data cell in the report template can be loaded from the data storage system (such as a database) and refreshed to the data cell corresponding to the row and column number. For example, the first target data corresponding to the first target row and column dimension combination "Subject A, Budget Amount, 2024, January" in the data cell of row 7 and column F is 700 (yuan), and thus the first target report can be obtained.
[0086] In this embodiment, row header tables and column header tables can be designed independently outside the data area table. Row dimension member information is stored in the row header table, and column dimension member information is stored in the column header table. Only the row and column numbers and their corresponding dimension member information need to be stored. Setting multi-dimensional information for each data cell requires less storage, resulting in higher efficiency in setting this information. Therefore, the report template generation efficiency is high. Furthermore, the independence of the row header tables and column header tables from the data area table, and the linked layout design of the row header tables, column header tables, and data area table, ensures that the report template generation does not affect the original main table's layout information. This avoids damage to the original layout information and data cell position offsets, and eliminates the need for various offset calculations for each data cell. The efficiency of setting multi-dimensional information for each data cell is high, thus achieving a WYSIWYG effect and further improving the report template generation efficiency. Secondly, only the row and column numbers and their corresponding dimension member information can be stored. When setting multi-dimensional information for each data cell, less information needs to be stored. Therefore, the computational overhead for parsing the first target row and column dimension combination for each first data cell is lower, saving resources. Next, the row header table and column header table can be tiled. This tiling method allows for dynamic linkage of data cells, row dimension cells, and column dimension cells, enabling simultaneous selection and display. Storing dimension member information in a dynamically linked manner improves the efficiency of determining the target dimension information for the Mth row and the Nth column, thereby further improving the efficiency of report template generation.
[0087] based on Figure 2The described embodiment, while requiring less stored information when setting multi-dimensional information for each data cell during report template generation, and featuring a WYSIWYG layout where row header and column header tables are independent of the data area table and linked with the data area table, further improves report template generation efficiency. However, when generating multiple report templates, various limitations still exist, leading to lower accuracy (e.g., overlapping templates) and / or lower generation efficiency. To address these issues, a detailed embodiment of this solution, which can be selectively implemented, is provided below. Please refer to [link to embodiment]. Figure 4 , Figure 4 This is a schematic diagram illustrating the process of generating another report template disclosed in an embodiment of this application. Another embodiment of the report template generation method of this application includes:
[0088] 401. Display the report template customization interface. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and column header table are located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table.
[0089] 402. Based on the first target data region selected in the data region table, determine the first target row header region in the row header table that corresponds to the first row number of the first target data region, and determine the first target column header region in the column header table that corresponds to the first column number of the first target data region.
[0090] 403. After determining the target dimension information of the Mth row dimension cell in the first target row header area and the target dimension information of the Nth column dimension cell in the first target column header area, combine the target dimension information of the Mth row and the target dimension information of the Nth column to obtain the first target row and column dimension combination of the data cell in the Mth row and Nth column of the first target data area.
[0091] 404. Generate a first target report template based on the first target data area and the first target row and column dimensions of each first data cell in the first target data area.
[0092] Steps 401 to 404 in this embodiment are the same as those described above. Figure 2 Steps 201 to 204 in the illustrated embodiment are similar and will not be repeated here.
[0093] 405. Based on the second target data region selected in the data region table, determine the second target row header region in the row header table that corresponds to the second row number of the second target data region, and determine the second target column header region in the column header table that corresponds to the second column number of the second target data region. The second row number is different from the first row number, and the second column number is different from the first column number.
[0094] After displaying the report template customization interface, you can determine the second target row header area corresponding to the second row number of the second target data area in the row header table and the column header area corresponding to the second column number of the second target data area, based on the second target data area selected in the data area table. The second row number is different from the first row number, and the second column number is different from the first column number.
[0095] Specifically, for example, suppose the first target data area is (F7:L13), the first row number involved is row 7 to row 13, and the first column number involved is column F to column L. The second target data area is (M15:P20), the second row number involved is row 15 to row 20, and the second column number involved is column M to column P.
[0096] It is worth mentioning that the second target data area can be selected in the data area table other than the first target data area, and the multi-dimensional member combination of each data cell in the second target data area can be set. This can avoid inaccuracies such as overlapping of multiple generated report templates, and can realize the setting of multi-dimensional member combination of data cells of multiple report templates in one interface (report template customization interface), and generate multiple report templates at the same time, thus improving the generation efficiency of multiple report templates.
[0097] 406. After determining the target dimension information of the Pth row dimension cell in the second target row header area and the target dimension information of the Qth column dimension cell in the second target column header area, combine the target dimension information of the Pth row and the target dimension information of the Qth column to obtain the second target row and column dimension combination of the data cell in the Pth row and Qth column of the second target data area.
[0098] Based on the selected second target data region, after determining the second target row header region in the row header table and the second target column header region in the column header table, the target dimension information of the Pth row dimension cell in the second target row header region and the target dimension information of the Qth column dimension cell in the second target column header region can be determined. Then, the second target row and column dimension combination of the Pth row target dimension information and the Qth column target dimension information is obtained by combining them.
[0099] 407. Generate a second target report template based on the second target data area and the combination of the second target row and column dimensions of each second data cell in the second target data area.
[0100] After combining the target dimension information of row P and column Q to obtain the second target row and column dimension combination of the data cell in row P and column Q of the second target data area, a second target report template can be generated based on the second target data area and the second target row and column dimension combination of each second data cell in the second target data area.
[0101] After generating the second target report template, when a trigger signal for generating the second target report based on the second target report template is detected, the second target data corresponding to the second target row and column dimension combination of each second data cell can be obtained and displayed in each second data cell to obtain the second target report.
[0102] Specifically, the logic for generating the second target report template and the second target report is similar to that for generating the first target report template and the first target report. For examples of generating the second target report template and the second target report, please refer to the examples of generating the first target report template and the first target report. They will not be repeated here.
[0103] In this embodiment, row header tables and column header tables can be designed independently outside the data area table. Row dimension member information is stored in the row header table, and column dimension member information is stored in the column header table. Only the row and column numbers and their corresponding dimension member information need to be stored. Setting multi-dimensional information for each data cell requires less storage, resulting in higher efficiency in setting this information. Therefore, the report template generation efficiency is high. Furthermore, the independence of the row header tables and column header tables from the data area table, and the linked layout design of the row header tables, column header tables, and data area table, ensures that the report template generation does not affect the original main table's layout information. This avoids damage to the original layout information and data cell position offsets, and eliminates the need for various offset calculations for each data cell. The efficiency of setting multi-dimensional information for each data cell is high, thus achieving a WYSIWYG effect and further improving the report template generation efficiency. Secondly, only the row and column numbers and their corresponding dimension member information need to be stored. Setting the multi-dimensional information for each data cell requires less storage, thus reducing the computational overhead of parsing the first target row and column dimension combination for each first data cell and the second target row and column dimension combination for each second data cell, saving resources. Next, the selection of the second target data area and the setting of the multi-dimensional member combination for each data cell in the second target data area can be performed in the data area table excluding the first target data area. This avoids inaccuracies such as overlapping generated report templates and allows for the simultaneous generation of multiple report templates on a single interface, improving the efficiency of generating multiple report templates.
[0104] based on Figure 2 The described embodiment, while requiring less stored information when setting multi-dimensional information for each data cell during report template generation, and featuring a WYSIWYG layout where row header and column header tables are independent of the data area table and linked with the data area table, further improves report template generation efficiency. However, in practical applications, there are often scenarios where report templates need to be modified midway through the process, and the modification efficiency is often low, leading to low report template generation efficiency. To address this issue, a detailed embodiment of this solution, which can be selectively implemented during implementation, is provided below. Please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram illustrating the process of generating another report template disclosed in an embodiment of this application. Another embodiment of the report template generation method of this application includes:
[0105] 501. Display the report template customization interface. The report template customization interface includes a data range table, a row header table, and a column header table. The row header table and column header table are located outside the data range table. The row numbers of the data range table correspond to the row numbers of the row header table, and the column numbers of the data range table correspond to the column numbers of the column header table.
[0106] 502. Based on the first target data region selected in the data region table, determine the first target row header region in the row header table that corresponds to the first row number of the first target data region, and determine the first target column header region in the column header table that corresponds to the first column number of the first target data region.
[0107] 503. Determine the initial dimension information of the Mth row dimension cell in the first target row header area, and the initial dimension information of the Nth column dimension cell in the first target column header area.
[0108] Steps 501 to 502 in this embodiment are the same as those described above. Figure 2 The steps involved in steps 201 to 203 in the illustrated embodiment are similar and will not be repeated here.
[0109] 504. Modify the initial dimension information of row M and column N to obtain the modified initial dimension information of row M and column N. The modified initial dimension information of row M is the target dimension information of row M, and the modified initial dimension information of column N is the target dimension information of column N.
[0110] The method for modifying the initial dimension information of the Mth row and the initial dimension information of the Nth column to obtain the modified initial dimension information of the Mth row and the Nth column can include, but is not limited to, the following two methods:
[0111] (1) Delete or add the initial sub-dimension information of the target M-th row sub-dimension, the target M-th row sub-dimension, and the target N-th column sub-dimension.
[0112] The method for deleting or adding the target M-th row sub-dimension, the initial sub-dimension information of the target M-th row sub-dimension, and the target N-th column sub-dimension and the initial sub-dimension information of the target N-th column sub-dimension can be as follows: First, delete or add the target M-th row sub-dimension and the initial sub-dimension information of the target M-th row initial dimension information to obtain the deleted or added target M-th row initial dimension information. The deleted or added target M-th row initial dimension information is the modified target M-th row initial dimension information. Then, delete or add the target N-th column sub-dimension and the initial sub-dimension information of the target N-th column target dimension information to obtain the deleted or added target N-th column target dimension information. The deleted or added target N-th column initial dimension information is the modified target N-th column target dimension information. The M-th row dimension cell includes multiple M-th row sub-dimensions, the M-th row initial dimension information includes multiple M-th row sub-dimension initial sub-dimension information, the N-th column initial dimension information includes multiple N-th column sub-dimensions, and the N-th column initial dimension information includes multiple N-th column sub-dimension initial sub-dimension information.
[0113] Specifically, for example, if the initial dimension information of a row includes two dimension members, "subject" and "data type", you can delete the "data type" dimension member. Then, the modified target dimension information of the column will only include the "subject" dimension member. You can also add dimension members to the initial dimension information of the row, which will not be elaborated here. You can also delete or add dimension members to the initial dimension information of the column, which will also not be elaborated here.
[0114] (2) Modify the field values of the initial dimension field in row M and / or the initial dimension field in row M, as well as the field values of the initial dimension field in column N and the initial dimension field in column N.
[0115] The method for modifying the initial dimension field of row M and / or the field value of the initial dimension field of row M, and the initial dimension field of column N and the field value of column N can be as follows: First, modify the field value of the initial dimension field of row M and / or the field value of the initial dimension field of row M to obtain the modified initial dimension field of row M and / or the field value of the initial dimension field of row M. The modified initial dimension field of row M and / or the field value of the initial dimension field of row M are the modified initial dimension information of row M. Then, modify the field value of the initial dimension field of column N and the field value of the initial dimension field of column N to obtain the modified initial dimension field of column N and the field value of the initial dimension field of column N. The modified initial dimension field of column N and the field value of the initial dimension field of column N are the modified initial dimension information of column N. The initial dimension information of row M includes the field value of the initial dimension field of row M and the initial dimension field of column N. The initial dimension information of column N includes the field value of the initial dimension field of column N and the initial dimension field of column N.
[0116] Specifically, for example, you can change the row initial dimension field "Period" to "Period / Month / Day", and change the field values of the row initial dimension field such as "January", "February", and "March" to "January 1st", "February 1st", and "March 1st" respectively. You can also modify the column initial dimension field and / or the field values of the column initial dimension field, which will not be elaborated here.
[0117] It is worth mentioning that the initial dimension information of the Mth row and the initial dimension information of the Nth column can be modified to cover various modification scenarios by deleting or adding the target Mth row / column sub-dimension, the initial sub-dimension information of the target Mth row / column sub-dimension, and modifying the field value of the initial dimension field of the Mth row / column and / or the initial dimension field of the Mth row / column. This provides a high degree of comprehensiveness in modification and allows for the direct modification of a small amount of dimension information in the row / column header table, which improves the efficiency of report template modification. Therefore, it further improves the efficiency of report template generation.
[0118] 505. Combine the target dimension information of row M and column N to obtain the first target row and column dimension combination of the data cell in row M and column N of the first target data area.
[0119] 506. Generate a first target report template based on the first target data area and the first target row and column dimension combination of each first data cell in the first target data area, so that when a trigger signal for generating a first target report based on the first target report template is detected, the first target data corresponding to the first target row and column dimension combination of each first data cell is obtained and displayed in each first data cell to obtain the first target report.
[0120] Steps 505 to 506 in this embodiment are the same as those described above. Figure 2 The steps involved in steps 203 to 204 in the illustrated embodiment are similar and will not be repeated here.
[0121] In this embodiment, row header tables and column header tables can be designed independently outside the data area table. Row dimension member information is stored in the row header table, and column dimension member information is stored in the column header table. Only the row and column numbers and their corresponding dimension member information need to be stored. Setting multi-dimensional information for each data cell requires less storage, resulting in higher efficiency in setting this information. Therefore, the report template generation efficiency is high. Furthermore, the independence of the row header tables and column header tables from the data area table, and the linked layout design of the row header tables, column header tables, and data area table, ensures that the report template generation does not affect the original main table's layout information. This avoids damage to the original layout information and data cell position offsets, and eliminates the need for various offset calculations for each data cell. The efficiency of setting multi-dimensional information for each data cell is high, thus achieving a WYSIWYG effect and further improving the report template generation efficiency. Secondly, only the row and column numbers and their corresponding dimension member information need to be stored. When setting multi-dimensional information for each data cell, the amount of information stored is relatively small. Therefore, the computational overhead for parsing the first target row and column dimension combination for each first data cell is low, saving resources. Next, the initial dimension information of the Mth row and the Nth column can be modified to cover various modification scenarios, providing high comprehensiveness for modifications. Furthermore, a small amount of dimension information can be modified directly in the row / column header table, improving the efficiency of report template modification. Therefore, the efficiency of report template generation is further improved.
[0122] The method for generating report templates in the embodiments of this application has been described above. The apparatus for generating report templates in the embodiments of this application will be described below. Please refer to [link / reference]. Figure 6 One embodiment of the report template generation device in this application includes:
[0123] The display unit is used to display the report template customization interface. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and the column header table are areas located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table.
[0124] The determining unit is configured to, based on the first target data region selected in the data region table, determine a first target row header region in the row header table whose row number corresponds to the first row number of the first target data region, and determine a first target column header region in the column header table whose column number corresponds to the first column number of the first target data region;
[0125] The unit is used to determine the target dimension information of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column dimension cell in the first target column header region, and then combine the target dimension information of the Mth row and the target dimension information of the Nth column to obtain the first target row and column dimension combination of the data cell of the Mth row and Nth column in the first target data region.
[0126] The generation unit is used to generate a first target report template based on the first target data region and the first target row and column dimensions of each first data cell in the first target data region.
[0127] The report template generation device further includes:
[0128] The synchronous selection display unit is used to synchronously select and display the Mth row dimension cell in the first target row header area and the Nth column dimension cell in the first target column header area based on the Mth row and Nth column data cell selected in the first target data area; the row header table is located to the left or right of the data area table, and the column header table is located above or below the data area table.
[0129] The combining unit is specifically used to obtain the Mth row dimension information and the Nth column dimension information determined by the user from the synchronously selected and displayed Mth row dimension cell and Nth column dimension cell.
[0130] The unit is specifically configured to, if a trigger signal is detected to configure the row dimension of the first target row header area and the column dimension of the target column header area, display a row and column dimension configuration interface. The row and column dimension configuration interface includes at least one preset row dimension and at least one preset column dimension. It acquires at least one target row dimension and at least one target column dimension selected by the user from the at least one preset row dimension and at least one preset column dimension, and determines the Mth row target dimension information and the Nth column target dimension information based on the at least one target row dimension and the at least one target column dimension; and / or acquires the Mth row target dimension information entered by the user in the Mth row dimension cell of the first target row header area, and the Nth column target dimension information entered by the user in the Nth column dimension cell of the first target column header area.
[0131] The determining unit is further configured to, based on the second target data region selected in the data region table, determine a second target row header region in the row header table whose row number corresponds to the second row number of the second target data region, and determine a second target column header region in the column header table whose column number corresponds to the second column number of the second target data region, wherein the second row number is different from the first row number and the second column number is different from the first column number;
[0132] The combining unit is further configured to determine the target dimension information of the Pth row dimension cell of the second target row header region and the target dimension information of the Qth column dimension cell of the second target column header region, and then combine the target dimension information of the Pth row and the target dimension information of the Qth column to obtain the second target row and column dimension combination of the data cell of the Pth row and Qth column of the second target data region.
[0133] The generation unit is further configured to generate a second target report template based on the second target data region and the second target row and column dimensions of each second data cell in the second target data region.
[0134] The determining unit is further configured to determine the initial dimension information of the Mth row of the Mth dimension cell in the first target row header region, and the initial dimension information of the Nth column of the Nth dimension cell in the first target column header region;
[0135] The determining unit is specifically used to modify the initial dimension information of the Mth row and the initial dimension information of the Nth column to obtain the modified initial dimension information of the Mth row and the modified initial dimension information of the Nth column. The modified initial dimension information of the Mth row is the target dimension information of the Mth row, and the modified initial dimension information of the Nth column is the target dimension information of the Nth column.
[0136] The determining unit is specifically used to delete or add the target M-row sub-dimension and the initial sub-dimension information of the target M-row sub-dimension to the initial dimension information of the M-row, so as to obtain the deleted or added initial dimension information of the M-row. The deleted or added initial dimension information of the M-row is the modified initial dimension information of the M-row. Similarly, it deletes or adds the target N-column sub-dimension and the initial sub-dimension information of the target N-column sub-dimension to the target dimension information of the N-column, so as to obtain the deleted or added target dimension information of the N-column. The deleted or added initial dimension information of the N-column is the modified target dimension information of the N-column. The M-row dimension cell includes multiple M-row sub-dimensions, the M-row initial dimension information includes multiple initial sub-dimensions of the M-row sub-dimensions, the N-column initial dimension information includes multiple initial sub-dimensions of the N-column sub-dimensions, and so on.
[0137] The determining unit is specifically used to modify the field values of the initial dimension field of the Mth row and / or the initial dimension field of the Mth row to obtain modified initial dimension field of the Mth row and / or the initial dimension field of the Mth row. The modified initial dimension field of the Mth row and / or the initial dimension field of the Mth row are the modified initial dimension information of the Mth row. The unit also modifies the field values of the initial dimension field of the Nth column and the initial dimension field of the Nth column to obtain modified initial dimension field of the Nth column and the initial dimension field of the Nth column. The modified initial dimension field of the Nth column and the initial dimension field of the Nth column are the modified initial dimension information of the Nth column. The initial dimension information of the Mth row includes the initial dimension field of the Mth row and the initial dimension field of the Mth row. The initial dimension information of the Nth column includes the initial dimension field of the Nth column and the initial dimension field of the Nth column.
[0138] In this embodiment, row header tables and column header tables can be designed independently outside the data area table. Row dimension member information is stored in the row header table, and column dimension member information is stored in the column header table. Only the row and column numbers and their corresponding dimension member information need to be stored. Setting multi-dimensional information for each data cell requires less storage, resulting in higher efficiency in setting this information. Therefore, the report template generation efficiency is high. Furthermore, the independence of the row header tables and column header tables from the data area table, and the linked layout design of the row header tables, column header tables, and data area table, ensures that the generation of the report template does not affect the original main table's layout information. This avoids damage to the original layout information and data cell position offsets, and eliminates the need for various offset calculations for each data cell. The efficiency of setting multi-dimensional information for each data cell is high, thus achieving a WYSIWYG effect and further improving the report template generation efficiency.
[0139] Please refer to the following: Figure 7 One embodiment of the computer device 700 in this application includes:
[0140] Central processing unit 701, memory 705, input / output interface 704, wired or wireless network interface 703, and power supply 702;
[0141] Memory 705 is either a short-term storage memory or a persistent storage memory;
[0142] The central processing unit 701 is configured to communicate with the memory 705 and execute instructions stored in the memory 705 to perform the aforementioned operations. Figure 2 , Figure 3 , Figure 4 and Figure 5The method in the illustrated embodiment.
[0143] This application also provides a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the aforementioned actions. Figure 2 , Figure 3 , Figure 4 and Figure 5 The method in the illustrated embodiment.
[0144] This application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to perform the aforementioned... Figure 2 , Figure 3 , Figure 4 and Figure 5 The method in the illustrated embodiment.
[0145] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0146] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0147] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0148] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0149] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0150] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for generating a report template, characterized in that, include: The report template customization interface is displayed. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and the column header table are areas located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table. Based on the first target data region selected in the data region table, a first target row header region corresponding to the first row number of the first target data region is determined in the row header table, and a first target column header region corresponding to the first column number of the first target data region is determined in the column header table. After determining the target dimension information of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column dimension cell in the first target column header region, the first target row and column dimension combination of the target dimension information of the Mth row and the target dimension information of the Nth column is obtained by combining the target dimension information of the Mth row and the target dimension information of the Nth column. The first target report template is generated based on the first target data area and the first target row and column dimensions of each first data cell in the first target data area.
2. The method according to claim 1, characterized in that, The row header table is located to the left or right of the data area table, and the column header table is located above or below the data area table. Before determining the target dimension information of the Mth row of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column dimension cell in the first target column header region, the method further includes: Based on the data cell in the Mth row and Nth column selected in the first target data area, the Mth row dimension cell is simultaneously selected and displayed in the first target row header area, and the Nth column dimension cell is simultaneously selected and displayed in the first target column header area; The step of determining the target dimension information of the Mth row of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column of the Nth column dimension cell in the first target column header region includes: In the synchronously selected and displayed Mth row dimension cell and Nth column dimension cell, obtain the Mth row dimension information and Nth column dimension information determined by the user.
3. The method according to claim 1, characterized in that, The step of determining the target dimension information of the Mth row of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column of the Nth column dimension cell in the first target column header region includes: If a trigger signal is detected to configure the row dimension of the first target row header area and the column dimension of the target column header area, the row and column dimension configuration interface is displayed, which includes at least one preset row dimension and at least one preset column dimension. Obtain at least one target row dimension and at least one target column dimension selected by the user from at least one preset row dimension and at least one preset column dimension, and determine the target dimension information of the Mth row and the target dimension information of the Nth column based on the at least one target row dimension and at least one target column dimension; and / or Obtain the target dimension information of the Mth row entered by the user in the Mth row dimension cell of the first target row header area, and the target dimension information of the Nth column entered by the user in the Nth column dimension cell of the first target column header area.
4. The method according to claim 1, characterized in that, After displaying the customizable report template interface, the method further includes: Based on the second target data region selected in the data region table, a second target row header region corresponding to the second row number of the second target data region is determined in the row header table, and a second target column header region corresponding to the second column number of the second target data region is determined in the column header table, wherein the second row number is different from the first row number, and the second column number is different from the first column number; After determining the target dimension information of the Pth row dimension cell in the second target row header region and the target dimension information of the Qth column dimension cell in the second target column header region, the second target row and column dimension combination of the Pth row target dimension information and the Qth column target dimension information is obtained by combining the Pth row target dimension information and the Qth column target dimension information; The second target report template is generated based on the second target data area and the combination of the second target row and column dimensions of each second data cell in the second target data area.
5. The method according to any one of claims 1 to 4, characterized in that, Before determining the target dimension information of the Mth row of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column dimension cell in the first target column header region, the method further includes: Determine the initial dimension information of the Mth row dimension cell in the first target row header region, and the initial dimension information of the Nth column dimension cell in the first target column header region; The step of determining the target dimension information of the Mth row of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column of the Nth column dimension cell in the first target column header region includes: The initial dimension information of the Mth row and the initial dimension information of the Nth column are modified to obtain the modified initial dimension information of the Mth row and the modified initial dimension information of the Nth column. The modified initial dimension information of the Mth row is the target dimension information of the Mth row, and the modified initial dimension information of the Nth column is the target dimension information of the Nth column.
6. The method according to claim 5, characterized in that, The Mth row dimension cell includes multiple Mth row sub-dimensions, the Mth row initial dimension information includes multiple Mth row sub-dimension initial sub-dimension information, the Nth column initial dimension information includes multiple Nth column sub-dimensions, and the Nth column initial dimension information includes multiple Nth column sub-dimension initial sub-dimension information. The modification of the initial dimension information of the Mth row and the initial dimension information of the Nth column to obtain the modified initial dimension information of the Mth row and the modified initial dimension information of the Nth column includes: The initial dimension information of the Mth row is processed by deleting or adding the target Mth row sub-dimension and the initial sub-dimension information of the target Mth row sub-dimension to obtain the deleted or added initial dimension information of the Mth row. The deleted or added initial dimension information of the Mth row is the modified initial dimension information of the Mth row. The target dimension information in column N is subjected to deletion or addition of the target sub-dimension in column N and the initial sub-dimension information of the target sub-dimension in column N, to obtain the target dimension information in column N after deletion or addition. The initial dimension information of column N after deletion or addition is the modified target dimension information in column N.
7. The method according to claim 5, characterized in that, The initial dimension information of the Mth row includes the initial dimension field of the Mth row and the field value of the initial dimension field of the Mth row; the initial dimension information of the Nth column includes the initial dimension field of the Nth column and the field value of the initial dimension field of the Nth column. The modification of the initial dimension information of the Mth row and the initial dimension information of the Nth column to obtain the modified initial dimension information of the Mth row and the modified initial dimension information of the Nth column includes: Modify the field value of the initial dimension field of the Mth row and / or the field value of the initial dimension field of the Mth row to obtain the modified initial dimension field of the Mth row and / or the field value of the initial dimension field of the Mth row, wherein the modified initial dimension field of the Mth row and / or the field value of the initial dimension field of the Mth row is the modified initial dimension information of the Mth row; The field values of the Nth column initial dimension field and the Nth column initial dimension field are modified to obtain the modified field values of the Nth column initial dimension field and the Nth column initial dimension field. The modified field values of the Nth column initial dimension field and the Nth column initial dimension field are the modified Nth column initial dimension information.
8. A report template generation device, characterized in that, include: The display unit is used to display the report template customization interface. The report template customization interface includes a data area table, a row header table, and a column header table. The row header table and the column header table are located outside the data area table. The row numbers of the data area table correspond to the row numbers of the row header table, and the column numbers of the data area table correspond to the column numbers of the column header table. The determining unit is configured to, based on the first target data region selected in the data region table, determine a first target row header region in the row header table whose row number corresponds to the first row number of the first target data region, and determine a first target column header region in the column header table whose column number corresponds to the first column number of the first target data region; The unit is used to determine the target dimension information of the Mth row dimension cell in the first target row header region and the target dimension information of the Nth column dimension cell in the first target column header region, and then combine the target dimension information of the Mth row and the target dimension information of the Nth column to obtain the first target row and column dimension combination of the data cell of the Mth row and Nth column in the first target data region. The generation unit is used to generate a first target report template based on the first target data region and the first target row and column dimensions of each first data cell in the first target data region.
9. A computer device, characterized in that, include: Central processing unit and memory; The memory is either a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 7.
11. A computer program product containing instructions, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Generation method of rank report template
CN114610801A
Excel data storage method and device, electronic equipment and computer storage medium
CN115481125A