Report generation method and device, equipment and storage medium
By introducing a report editing interface and report engine in the report generation system, it supports parameterized configuration, which solves the problem of lack of dynamic configuration support in traditional reporting systems, and achieves more flexible and automated report generation, reducing labor costs and improving accuracy .
Patent Information
- Application Number
- CN202411648897.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2024-12-17
AI Technical Summary
The lack of dynamic configuration support for traditional report generation systems leads to inflexible and automated report generation, increasing development costs and labor costs, and possible human errors.
Provide a report generation method, which can obtain the configuration parameters entered by the user by displaying the report editing interface, including report attribute configuration controls, report element configuration controls, report data source configuration controls, subreport configuration controls and report format configuration controls, and obtain the configuration parameters entered by the user and call the report engine Generate report files and support parameterized configuration to meet different data needs.
It improves the flexibility and automation of report generation, significantly reduces labor costs, and improves work efficiency and report accuracy.
Smart Images

Figure CN119150815A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a report generation method, device, equipment and storage medium. Background Art
[0002] A report is a document or visualization tool that presents data, information, and analysis results. Report files usually include some basic elements, including report title, overview information, report body, and footer information.
[0003] Traditional report generation systems require a lot of manual writing and configuration, which is labor-intensive, inefficient, and prone to errors. Although various existing report systems can generate reports based on files, they lack support for dynamic configuration in the database, which limits the flexibility and automation of report generation. For example, if the report requirements change, developers need to modify the report files. At the same time, if the application needs to generate a large number of reports, this will increase development costs. Summary of the invention
[0004] The purpose of this application is to provide a report generation method, device, equipment and storage medium.
[0005] To achieve the above objectives, this application provides the following solutions: In a first aspect, the present application provides a report generation method, comprising: In response to the received report generation request, displaying a report editing interface, the report editing interface at least including: a report property configuration control, a report element configuration control, a report data source configuration control, a sub-report configuration control, and a report format configuration control; Acquire report configuration parameters respectively input into the report attribute configuration control, the report element configuration control, the report data source configuration control, the sub-report configuration control, and the report format configuration; The report engine is called to generate a report file based on the report configuration.
[0006] Optionally, the report configuration parameters at least include: report attribute configuration parameters, report element configuration parameters, report data source configuration parameters, sub-report configuration parameters, and report format configuration parameters; The step of calling the report engine to generate a report based on the report configuration includes: Get program parameter data from the application; Generate a report file based on the report attribute configuration parameters, the report element configuration parameters, and the report data source configuration parameters, and fill the report file based on the program parameter data; Generate a subreport for the report file based on the subreport configuration parameters; Output a report file that conforms to the report format configuration parameters.
[0007] Optionally, the configuration process of the report attribute configuration control includes: Receive the report title, report footer, and report page size input into the report property configuration control.
[0008] Optionally, the configuration process of the report element configuration control includes: Receive the element title, element value, element data type, element position relationship, element row and column position, and element text format input into the report element configuration control.
[0009] Optionally, the configuration process of the report data source configuration control includes: Receive a data source input into the report data source configuration control, the data source includes at least: a fixed data source, a dynamic data source, wherein when there are multiple data sources, the multiple data sources are associated with each other through report numbers.
[0010] Optionally, the configuration process of the subreport configuration control includes: Receive subreport attributes, subreport elements, subreport data sources, and subordinate relationships between subreports and main reports input into the subreport configuration control.
[0011] Optionally, the configuration process of the report format configuration control includes: The report format configuration parameters input into the report format configuration control are received. In a second aspect, the present application provides a report generation device, comprising: A display module, for responding to a received report generation request and displaying a report editing interface, wherein the report editing interface at least includes: a report attribute configuration control, a report element configuration control, a report data source configuration control, a sub-report configuration control, and a report format configuration control; An input module, used for obtaining report configuration parameters respectively input into the report attribute configuration control, the report element configuration control, the report data source configuration control, the sub-report configuration control, and the report format configuration; The generating module is used to call the reporting engine to generate a reporting file based on the reporting configuration.
[0012] Optionally, the report configuration parameters at least include: report attribute configuration parameters, report element configuration parameters, report data source configuration parameters, sub-report configuration parameters, and report format configuration parameters; The generating module is further used for: Get program parameter data from the application; Generate a report file based on the report attribute configuration parameters, the report element configuration parameters, and the report data source configuration parameters, and fill the report file based on the program parameter data; Generate a subreport for the report file based on the subreport configuration parameters; Output a report file that conforms to the report format configuration parameters.
[0013] Optionally, the input module is further used to: Receive the report title, report footer, and report page size input into the report property configuration control.
[0014] Optionally, the input module is further used to: Receive the element title, element value, element data type, element position relationship, element row and column position, and element text format input into the report element configuration control.
[0015] Optionally, the input module is further used to: Receive a data source input into the report data source configuration control, the data source includes at least: a fixed data source, a dynamic data source, wherein when there are multiple data sources, the multiple data sources are associated with each other through report numbers.
[0016] Optionally, the input module is further used to: Receive subreport attributes, subreport elements, subreport data sources, and subordinate relationships between subreports and main reports input into the subreport configuration control.
[0017] Optionally, the input module is further used to: Receive report format configuration parameters input into the report format configuration control.
[0018] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-mentioned report generation methods.
[0019] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the report generation methods described above.
[0020] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any one of the report generation methods described above.
[0021] According to the specific embodiments provided in this application, this application discloses the following technical effects: The present application provides a report generation method, apparatus, device and storage medium, which adapt to different data requirements through parameterized configuration, solve the problem that traditional reporting systems lack dynamic configuration support, make report generation more flexible and automated, and the visual configuration interface and automated report generation process significantly reduce the manpower cost required for report generation, which not only improves work efficiency, but also reduces the possibility of human errors and improves the accuracy of reports. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A flowchart of a report generation method provided in one embodiment of the present application; Figure 2 This is one of the effect schematic diagrams of a report generation method provided in one embodiment of the present application; Figure 3 A second effect diagram of a report generation method provided by an embodiment of the present application; Figure 4 A third effect diagram of a report generation method provided by an embodiment of the present application; Figure 5 A fourth effect diagram of a report generation method provided by an embodiment of the present application; Figure 6 A fifth effect diagram of a report generation method provided in an embodiment of the present application; Figure 7 A sixth effect diagram of a report generation method provided in an embodiment of the present application; Figure 8 A seventh effect diagram of a report generation method provided in an embodiment of the present application; Fig. 9 An eighth effect diagram of a report generation method provided by an embodiment of the present application; Fig.10 A ninth effect diagram of a report generation method provided by an embodiment of the present application; Fig.11 A tenth effect diagram of a report generation method provided by an embodiment of the present application; Fig.12 The eleventh effect diagram of a report generation method provided by an embodiment of the present application; Fig.13 A twelfth effect diagram of a report generation method provided by an embodiment of the present application; Fig.14 The thirteenth effect diagram of a report generation method provided by an embodiment of the present application; Fig.15 A fourteenth effect diagram of a report generation method provided in an embodiment of the present application; Fig.16 A fifteenth effect diagram of a report generation method provided by an embodiment of the present application; Fig.17 A sixteenth effect diagram of a report generation method provided by an embodiment of the present application; Fig.18 The seventeenth effect diagram of a report generation method provided by an embodiment of the present application; Fig.19 The eighteenth effect diagram of a report generation method provided by an embodiment of the present application; Fig. 20 A nineteenth effect diagram of a report generation method provided in an embodiment of the present application; Fig.21 20 is a schematic diagram of the effect of a report generation method provided in one embodiment of the present application; Fig. 22 Schematic diagram 21 of the effect of a report generation method provided by an embodiment of the present application; Fig.23 Schematic diagram 22 of the effect of a report generation method provided by an embodiment of the present application; Fig.24 Schematic diagram 23 of the effect of a report generation method provided by an embodiment of the present application; Fig.25 A schematic diagram of functional modules of a report generation device provided in one embodiment of the present application; Fig.26 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] like Figure 1As shown, some embodiments of the present application provide a report generation method, which includes: Step 101, in response to a received report generation request, displaying a report editing interface, the report editing interface at least including: a report property configuration control, a report element configuration control, a report data source configuration control, a sub-report configuration control, and a report format configuration control.
[0026] Step 102: Acquire report configuration parameters respectively input into the report attribute configuration control, the report element configuration control, the report data source configuration control, the sub-report configuration control, and the report format configuration.
[0027] Step 103: calling a report engine to generate a report file based on the report configuration.
[0028] In the embodiment of the present application, when the system receives a report generation request from a user or application, it will immediately respond and display a comprehensive and intuitive report editing interface. The report editing interface is used to define and configure various aspects of the report, thereby ensuring that the generated report can meet the user's specific needs.
[0029] Among them, the report property configuration control allows users to set basic report properties, such as report title, footer information, and report page size. Through this control, users can define the overall appearance and basic information of the report to ensure that the report has clear identification and unified format when displayed.
[0030] The report element configuration control is used to define the various elements in the report in detail, including titles, data fields, graphics, images, etc. Users can specify the element's type, position, format, and relationship with other elements in this control. At the same time, it also supports dynamic adjustment of element visibility based on user permissions to ensure the personalization and security of report content.
[0031] The report data source configuration control is the source of report data. This control allows users to specify how to obtain the data required for the report. Users can directly write SQL query statements or obtain data through stored procedures. In addition, parameterized configuration is also supported, so that report data can change dynamically according to actual needs. For complex reports, it also supports configuring multiple data sources and associating them through report numbers.
[0032] The subreport configuration control is a small report embedded in the main report, which is used to display additional information associated with the main report. Through the subreport configuration control, users can define the properties, elements and data sources of the subreport, as well as the subordinate relationship with the main report. During the report generation process, the report engine automatically parses the subreport configuration and merges it into the main report.
[0033] The report format configuration control allows users to select the output format of the report, such as PDF, Excel, Word, HTML, etc. Users can choose the most suitable format for output according to actual needs so that they can be viewed and edited on different devices and platforms.
[0034] The parameters entered by the user through various configuration controls in the report editing interface will be collected and saved by the system. These parameters include report properties, element definitions, data source configuration, sub-report configuration, report format and other configuration information related to report generation.
[0035] When the user completes all configurations and confirms that they are correct, the system will call the report engine to generate the report file. The report engine first parses the report configuration parameters entered by the user, and then generates the report file in the format and layout defined by the user based on these parameters and the data source information in the database. Finally, the generated report file will be output in the format specified by the user for the user to download, view or print.
[0036] The embodiments of the present application adapt to different data requirements through parameterized configuration, which solves the problem that traditional reporting systems lack dynamic configuration support, making report generation more flexible and automated. The visual configuration interface and automated report generation process significantly reduce the manpower cost required for report generation, which not only improves work efficiency but also reduces the possibility of human errors and improves the accuracy of reports.
[0037] Optionally, the report configuration parameters at least include: report attribute configuration parameters, report element configuration parameters, report data source configuration parameters, sub-report configuration parameters, and report format configuration parameters. Step 103 includes: Step 1031, obtaining program parameter data from the application.
[0038] Step 1032: Generate a report file based on the report attribute configuration parameters, the report element configuration parameters, and the report data source configuration parameters, and fill the report file based on the program parameter data.
[0039] Step 1033: Generate a subreport for the report file based on the subreport configuration parameters.
[0040] Step 1034: output a report file that complies with the report format configuration parameters.
[0041] In the embodiment of the present application, when the system receives a report generation request, it first obtains the necessary program parameter data from the application that initiates the request. These parameter data may include user session information, query strings, form data, etc., which are essential for the generation of reports and the filling of data. After obtaining the program parameter data, the system generates the framework of the report file based on the previously defined report attribute configuration parameters, report element configuration parameters, and report data source configuration parameters. This framework includes the basic structure of the report, element layout, and connection information of the data source, etc. The system fills the report file according to the program parameter data. This means that the system parses the data in the data source and places the corresponding data in the corresponding position of the report according to the report element definition. If dynamic parameters (such as certain values in the user session or parameters in the query string) are specified in the report element configuration, the system will also parse and fill these parameter values into the report. After the main part of the report file is filled, the system will check whether there are sub-report configuration parameters. If so, the system will generate sub-reports for the report file based on these configuration parameters. The generation process of the sub-report is similar to that of the main report, including parsing the attributes, elements, and data source configuration of the sub-report, and generating the framework and data filling of the sub-report based on these configurations.
[0042] Finally, the system will output a report file that meets the requirements according to the report format configuration parameters. The report format can be one of many formats such as PDF, Excel, Word, HTML, etc., depending on the user's configuration. Before outputting the report file, the system will perform final formatting and verification to ensure the integrity and accuracy of the report file.
[0043] Optionally, the configuration process of the report property configuration control includes: receiving a report title, a report footer, and a size of a report page input into the report property configuration control.
[0044] In the embodiments of this application, refer to Figure 2 You can enter the report title and report subtitle in the title input field (ReporrtHeader) and subtitle input field (Title) in the report property configuration control.
[0045] Reference Figure 3 , you can enter the report footer in the report footer input field (ReportFooter) in the report property configuration control to define the report summary and display it at the bottom of each page of the file. The corresponding report is generated at the end of each page of the report file, for example Figure 4 and Figure 5 When a footer is defined in the table, other additional information will be automatically added to the bottom of the final report, including the time the report was generated, the user, the current page of the report, and the total number of pages.
[0046] Reference Figure 6 You can define the size of the report page by using the PageWidth and PageHeight input fields in the report property configuration control.
[0047] Optionally, the configuration process of the report element configuration control includes: receiving element title, element value, element data type, element position relationship, element row and column position, and element text format input into the report element configuration control.
[0048] In the embodiment of the present application, the report element configuration control is the main content area of the final presentation of the report, corresponding to the detailed information of the elements that define the report. Each element can specifically define the title and value, the positional relationship between the title and the value (upper and lower relationship, left and right relationship, or no title is displayed), the data type (dates and columns in different formats, etc.), the row and column of the element in the report, the text format (font size, name, color, whether to display a border), etc. The visibility of each element in the report can be dynamically determined according to the user's permissions, that is, users with different permissions may see different report contents. This permission control mechanism can ensure the security and personalized display of the report, so that the report can be customized and presented according to the user's needs and permissions. Because the report is ultimately presented in the form of displaying data, each element needs to specify its data source.
[0049] Reference Figure 7 You can define the element and the name (ObjectName) of the element displayed in the caption (caption) by using the element type input field (ElementType) in the report property configuration control. The supported element types include labels, currencies, dates, images, radio buttons, check boxes, tables, and grouping areas.
[0050] Reference Figure 8, you can define the position of the element in the report by configuring the row (row) and column (col) in the report property control. The row and column values can be continuous (such as 1,2,3...) or there can be gaps (such as 1,3,4...). In the process of generating reports, the Report Engine will automatically calculate the row and column of the element in order according to the configured row and column. For example, the following element is configured with 2 rows and 2 columns, but because the element is the first element in the second row, the element is automatically located at the first column of the second row in the report file, and there will be no blank space on the left because the configured column is 2. If the report requires a blank area on the left due to special requirements, you only need to set the corresponding element title and value to empty, so that a blank placeholder element is generated. When calculating the width of the element column, the report engine will first calculate the total number of columns (the column where the current row is located), and then combine the percentage of each column width to calculate the specific width of each column. The height occupied by each element is a fixed value, and the height will be automatically adjusted according to the text of the element (such as multi-line text).
[0051] Reference Fig. 9 , you can define the number of columns that an element occupies in a report through the colspan in the report property configuration control. The default value is 1, which means that the column width is distributed equally among the elements in each row. For example, if you define a report with a maximum of 4 columns per row, and the colspan value of "Case Number" is set to 2, then the element occupies the width of two columns.
[0052] Reference Fig.10 You can define the positional relationship between the title and content of an element by configuring the position type (postType) in the report property configuration control. A value of 1 means that the title and content are arranged left and right, and a value of 2 means that the title and content are arranged up and down. Fig.11 If you want to display tabular data in the report, set the element type (ElementType) to list (List) and specify the corresponding data table (DataSource_Table). Fig.12 , each column of the data table is also defined in the report element.
[0053] Reference Fig.13 , you can set permissions through the conditions in the report property configuration control, and display or not display the corresponding elements according to whether the user who currently generates the report has the corresponding permissions. For example, the following table element can only be seen by users with permission number "1233". Reports generated by users without permission number "1233" do not include this table, so that different users with different permissions can generate different files with the same set of report settings.
[0054] Reference Fig.14, you can use the attribute in the report property configuration control to extend the text format of the element, and set it with the key names supported by the report engine, such as text horizontal alignment (TextAlign) left, center or right; vertical alignment (VerticalAlign) top alignment, center alignment or bottom alignment; background color (BackgroundColor), font name (FontFamily), color (Color), text weight (FontWeight) and specify special text format (TextDecoration), such as underline and overline. For example, set the text of the "Case Name" element in the report to bold, red font and yellow background.
[0055] Reference Fig.15 The title of an element also supports text formatting. It is the same as the text key name of the element, but starts with an underscore. For example, you can set the color of the "Case Name" title in the report to be darker.
[0056] Reference Fig.16 You can use the form ID (FormID) in the report property configuration control to obtain the corresponding value through the element name (objectname) of the data source (table asp_report_datasource).
[0057] Optionally, the configuration process of the report data source configuration control includes: receiving a data source input into the report data source configuration control, the data source including at least: a fixed data source, a dynamic data source, wherein when there are multiple data sources, the multiple data sources are associated with each other through report numbers.
[0058] In the embodiment of the present application, the report data source configuration control is the data service source of various elements (including basic elements and table elements) of the report. It can directly write native database query language (SQL) or return data through stored procedures. Because the report data is dynamic, the data source also supports parameterized configuration. For example, refer to Fig.17 , according to different cases, the case number (case_id) can be parameterized as [util:case_id]. The report engine can automatically parse the parameters. The supported parameter types include query string (qs), form (form), user session (session), and application running context (util). At the same time, for more complex reports, the data may come from different business tables, so it also supports the configuration of multiple data sources, and each data source is associated through the report number (ReportID). For example, the following report elements correspond to different data sources.
[0059] Optionally, the configuration process of the subreport configuration control includes: receiving subreport attributes, subreport elements, subreport data sources, and a subordinate relationship between a subreport and a main report input into the subreport configuration control.
[0060] In the embodiment of the present application, the configuration of the sub-report is the same as that of the main report, that is, the sub-report number (ReportID) to be generated is defined in the above three tables, and the sub-report parameters are passed in when calling.
[0061] For example, the button event definition on the page: onClick="javascript:window.open(' / aspsoft / report / InterMedia.aspx?report_id=inquireCaseFile&sub_report=inquireCase_suspect&case_id=[se:case_id]');" Among them, report_id is the main report number, sub_report is the sub-report number, and the definition of the sub-report in the database is the same as the main report.
[0062] For example, in the definition of subreport number inquireCase_suspect, the subreport attribute definition can refer to Fig.18 , the subreport element definition can refer to Fig.19 , the subreport data source definition can refer to Fig. 20 When generating a report, the report engine generates the main report first. If a sub-report parameter is found, the sub-report file is generated. After the file is generated, all report files are merged and displayed. The effect is shown in Fig.21 .
[0063] Optionally, the configuration process of the report format configuration control includes: receiving report format configuration parameters input into the report format configuration control.
[0064] The Report Engine supports generating reports in different formats, including PDF, WORD, EXCEL, and IMAGE. When calling, you can pass in the report format. For example, to generate a file in word format, the button event definition on the page is: onClick="javascript: window.open(' / aspsoft / report / InterMedia.aspx?report_id=inquireCaseFile&report_format=word&case_id=[se:case_id]');" The report format (report_format) parameter value is word, and the effect is as follows Fig. 22 .
[0065] Further, see Fig.23 In order to call the report engine to generate a report, the application needs to pass in the parameter "report number" (i.e. ReportID). The configuration related to the report number has been configured completely and correctly in the above table. For example, in a web application, the report engine has been deployed on the server, and there is a button "Print Report" on the page. In order to click this button to generate a report, the calling address and parameters are: onClick="javascript: window.open(' / aspsoft / report / InterMedia.aspx?report_id=inquireCaseFile&case_id=[se:case_id]');" Report_id is the report ID parameter.
[0066] The report engine first automatically analyzes and collects various parameters of the application, including form data on the page, query strings, user sessions, and current case numbers (this varies depending on the system). These data are prepared for parsing report data.
[0067] The report engine reads the defined data in the table, including the above-mentioned report attribute definition, report element definition, report data source definition, and generates the files required for the report.
[0068] Note: The generated report file is RDL, which is Microsoft's Report Definition Language, a standard language for defining reports.
[0069] The configuration of the report file's title, footer, rows, columns, and tables is described in the first part above.
[0070] The data source required by the report element, in which the dynamic parameters are automatically parsed according to the collected data, for example, replacing the "case number" (case_id) in the query statement with the number value of the current case.
[0071] After the report file is generated, the report engine will load the file into the report component and generate a complete report page through the report service. For example Fig.24 .
[0072] Based on the same inventive concept, the embodiment of the present application also provides a report generation device for implementing the report generation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more report generation device embodiments provided below can refer to the limitations on the report generation method above, and will not be repeated here.
[0073] In an exemplary embodiment, Fig.25 As shown, a report generation device 20 is provided, comprising: The display module 201 is used to display a report editing interface in response to a received report generation request, wherein the report editing interface at least includes: a report attribute configuration control, a report element configuration control, a report data source configuration control, a sub-report configuration control, and a report format configuration control; An input module 202, used to obtain report configuration parameters respectively input into the report attribute configuration control, the report element configuration control, the report data source configuration control, the sub-report configuration control, and the report format configuration; The generating module 203 is used to call the report engine to generate a report file based on the report configuration.
[0074] Optionally, the report configuration parameters at least include: report attribute configuration parameters, report element configuration parameters, report data source configuration parameters, sub-report configuration parameters, and report format configuration parameters; The generating module 203 is further used for: Get program parameter data from the application; Generate a report file based on the report attribute configuration parameters, the report element configuration parameters, and the report data source configuration parameters, and fill the report file based on the program parameter data; Generate a subreport for the report file based on the subreport configuration parameters; Output a report file that conforms to the report format configuration parameters.
[0075] Optionally, the input module 202 is further used for: Receive the report title, report footer, and report page size input into the report property configuration control.
[0076] Optionally, the input module 202 is further used for: Receive the element title, element value, element data type, element position relationship, element row and column position, and element text format input into the report element configuration control.
[0077] Optionally, the input module 202 is further used for: Receive a data source input into the report data source configuration control, the data source includes at least: a fixed data source, a dynamic data source, wherein when there are multiple data sources, the multiple data sources are associated with each other through report numbers.
[0078] Optionally, the input module 202 is further used for: Receive subreport attributes, subreport elements, subreport data sources, and subordinate relationships between subreports and main reports input into the subreport configuration control.
[0079] Optionally, the input module 202 is further used for: Receive report format configuration parameters input into the report format configuration control.
[0080] The embodiments of the present application adapt to different data requirements through parameterized configuration, which solves the problem that traditional reporting systems lack dynamic configuration support, making report generation more flexible and automated. The visual configuration interface and automated report generation process significantly reduce the manpower cost required for report generation, which not only improves work efficiency but also reduces the possibility of human errors and improves the accuracy of reports.
[0081] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.26As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store report generation data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a report generation method is implemented.
[0082] Those skilled in the art will understand that Fig.26 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0083] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0084] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0085] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0086] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0087] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0088] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0089] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0090] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A report generation method, characterized in that: The report generation method comprises: In response to the received report generation request, displaying a report editing interface, the report editing interface at least including: a report property configuration control, a report element configuration control, a report data source configuration control, a sub-report configuration control, and a report format configuration control; Acquire report configuration parameters respectively input into the report attribute configuration control, the report element configuration control, the report data source configuration control, the sub-report configuration control, and the report format configuration; The report engine is called to generate a report file based on the report configuration.
2. The report generation method according to claim 1, characterized in that: The report configuration parameters at least include: report attribute configuration parameters, report element configuration parameters, report data source configuration parameters, sub-report configuration parameters, and report format configuration parameters; The step of calling the report engine to generate a report based on the report configuration includes: Get program parameter data from the application; Generate a report file based on the report attribute configuration parameters, the report element configuration parameters, and the report data source configuration parameters, and fill the report file based on the program parameter data; Generate a subreport for the report file based on the subreport configuration parameters; Output a report file that conforms to the report format configuration parameters.
3. The report generation method according to claim 1, characterized in that: The configuration process of the report attribute configuration control includes: Receive the report title, report footer, and report page size input into the report property configuration control.
4. The method according to claim 1, characterized in that: The configuration process of the report element configuration control includes: Receive the element title, element value, element data type, element position relationship, element row and column position, and element text format input into the report element configuration control.
5. The report generation method according to claim 1, characterized in that: The configuration process of the report data source configuration control includes: Receive a data source input into the report data source configuration control, the data source includes at least: a fixed data source, a dynamic data source, wherein when there are multiple data sources, the multiple data sources are associated with each other through report numbers.
6. The report generation method according to claim 1, characterized in that: The configuration process of the subreport configuration control includes: Receive subreport attributes, subreport elements, subreport data sources, and subordinate relationships between subreports and main reports input into the subreport configuration control.
7. The report generation method according to claim 1, characterized in that: The configuration process of the report format configuration control includes: Receive report format configuration parameters input into the report format configuration control.
8. A report generation device, characterized in that: The report generating device comprises: A display module, for displaying a report editing interface in response to a received report generation request, wherein the report editing interface at least includes: a report attribute configuration control, a report element configuration control, a report data source configuration control, a sub-report configuration control, and a report format configuration control; An input module, used for obtaining report configuration parameters respectively input into the report attribute configuration control, the report element configuration control, the report data source configuration control, the sub-report configuration control, and the report format configuration; The generating module is used to call the reporting engine to generate a reporting file based on the reporting configuration.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the report generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the report generation method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Report generation system and method
CN106528514A
Report generation method and system, storage medium and electronic equipment
CN112463797A
Application construction method and device, electronic equipment and storage medium
CN116974551A
Automated report building system
US20040117731A1
