Report generation method and device, electronic equipment and storage medium
By using a dynamic generation method for data display components and component configuration areas, the problems of low efficiency and low accuracy in traditional report generation are solved, achieving efficient and accurate report generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RICHFIT INFORMATION TECH
- Filing Date
- 2024-11-20
- Publication Date
- 2026-05-22
AI Technical Summary
Traditional report generation methods are inefficient and have low data accuracy when faced with a large number of report requests.
Through the data display component and component configuration area, users can select and configure target data display components, style components and data sources in the report generation interface, automatically calculate the drag position and display the dataset, support the query and addition of datasets and data sources, and realize the dynamic generation of reports.
It improves the efficiency and accuracy of report generation, and meets users' personalized report generation needs.
Smart Images

Figure CN122072811A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of report processing, and more specifically, to a report generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] A report is a tool that uses tables, charts, and other formats to dynamically display data. It is primarily used to report information to superiors, showcasing dynamic data through diverse formats.
[0003] Traditional report generation methods typically involve business and development personnel manually creating reports from data. When the demand for reports is high, both report generation efficiency and data accuracy are low. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a report generation method, apparatus, electronic device and storage medium that can generate reports from data through a data display component, thereby improving report generation efficiency and data accuracy.
[0005] In a first aspect, embodiments of this application provide a report generation method, which includes:
[0006] In response to a report generation request initiated by a user in the report processing interface, the report generation interface corresponding to the report generation request is displayed to the user; the report generation interface includes a report generation area and a parameter configuration area;
[0007] In response to the target data display component selected by the user in the data display component of the report generation area, the component configuration fields corresponding to the target data display component are displayed in the parameter configuration area, so that the user can configure the dataset and data display parameters of the target data display component based on the displayed component configuration fields;
[0008] The report generation area displays data from the dataset based on data display parameters and the target data display component.
[0009] In response to a report completion request initiated by the user in the report generation interface, generate a report from the content in the report generation area.
[0010] In one possible implementation, the report generation interface further includes a component configuration area, which includes a data display component; the method further includes:
[0011] In response to the generation of the drag-and-drop data display component selected by the user in the component configuration area, record the starting drag position and drag offset of the drag-and-drop data display component;
[0012] Calculate the target drag position corresponding to the drag data display component based on the starting drag position and drag offset;
[0013] If the target drag position is within the report generation area, the dragged data display component will be displayed at the target drag position.
[0014] In one possible implementation, the method further includes:
[0015] In response to a dataset generation request initiated by a user in the dataset processing interface, the dataset generation interface is displayed to the user. The dataset generation interface includes dataset generation fields. The dataset generation fields include a data source identifier field, a dataset identifier field to be generated field, a dataset query statement field, and query parameter fields corresponding to the dataset query statement field.
[0016] In response to the user's input of the data source identifier, the dataset identifier to be generated, the dataset query statement and the query parameters corresponding to the dataset query statement in the dataset generation interface, the data query is performed in the data source corresponding to the data source identifier according to the dataset query statement and the corresponding query parameters to obtain the dataset corresponding to the dataset identifier to be generated.
[0017] Among them, the dataset query statement is used to characterize the query logic of the data in the dataset corresponding to the dataset identifier to be generated, and the query parameters are used to characterize the query conditions of the data in the dataset corresponding to the dataset identifier to be generated.
[0018] In one possible implementation, the method further includes:
[0019] In response to a data source addition request initiated by the user in the data source processing interface, the data source addition interface is displayed to the user; the data source addition interface includes data source addition fields; the data source addition fields include a data source identifier field to be added and a data source path information field to be added;
[0020] In response to the user's input of the data source identifier and data source path information in the data source addition interface for adding fields to the data source, the data source corresponding to the data source identifier is added according to the data source path information.
[0021] In one possible implementation, the method further includes:
[0022] In response to the user's account and password information entered on the login screen, the generated user is authenticated based on the account and password information;
[0023] After successful authentication, the reports within the user's permissions will be configured in the corresponding report processing interface, and the processing permissions for each report will be granted to the user. Processing permissions include report modification permissions. Report modification permissions are used to limit whether the user can initiate report generation requests.
[0024] In one possible implementation, after successful authentication, the method further includes:
[0025] Configure the datasets added by the user to the corresponding dataset processing interface, and grant the user the processing permissions for each dataset.
[0026] The user-generated data source will be configured in the corresponding data source processing interface, and the user will be granted processing permissions for each data source.
[0027] In one possible implementation, the method further includes:
[0028] In response to the target style component selected by the user in the style component of the report generation area, the component configuration field corresponding to the target style component is displayed in the parameter configuration area, so that the user configures the style display parameters of the target style component based on the displayed component configuration field;
[0029] The style component is used to decorate the report generation area;
[0030] The target style component is displayed in the report generation area based on the style display parameters.
[0031] Secondly, embodiments of this application also provide a report generation apparatus, which includes:
[0032] The response module is used to respond to the report generation request initiated by the generating user in the report processing interface, and to display the report generation interface corresponding to the report generation request to the generating user; the report generation interface includes a report generation area and a parameter configuration area;
[0033] The response module is also used to respond to the target data display component selected by the generating user in the data display component of the report generation area, and to display the component configuration fields corresponding to the target data display component in the parameter configuration area, so that the generating user can configure the dataset and data display parameters of the target data display component based on the displayed component configuration fields;
[0034] The display module is used to display data in the dataset in the report generation area based on data display parameters and target data display components;
[0035] The response module is also used to respond to the report completion request initiated by the user in the report generation interface and generate a report from the content in the report generation area.
[0036] In one possible implementation, the report generation interface further includes a component configuration area, which includes a data display component; the device also includes: a calculation module and a display module.
[0037] The response module is used to respond to the data display component selected by the user in the data display component within the component configuration area, and to record the starting drag position and drag offset of the drag data display component.
[0038] The calculation module is used to calculate the target drag position corresponding to the drag data display component based on the starting drag position and the drag offset.
[0039] The display module is used to display the dragged data display component at the target dragged position if the target dragged position is within the report generation area.
[0040] In one possible implementation, the response module is further configured to respond to a dataset generation request initiated by the user in the dataset processing interface by displaying the dataset generation interface to the user; the dataset generation interface includes dataset generation fields; the dataset generation fields include a data source identifier field, a dataset identifier field to be generated, a dataset query statement field, and query parameter fields corresponding to the dataset query statement field.
[0041] The response module is also used to respond to the data source identifier, the dataset identifier to be generated, the dataset query statement and the query parameters corresponding to the dataset query statement input by the user in the dataset generation interface for the dataset generation field, and to perform data query in the data source corresponding to the data source identifier according to the dataset query statement and the corresponding query parameters to obtain the dataset corresponding to the dataset identifier to be generated.
[0042] Among them, the dataset query statement is used to characterize the query logic of the data in the dataset corresponding to the dataset identifier to be generated, and the query parameters are used to characterize the query conditions of the data in the dataset corresponding to the dataset identifier to be generated.
[0043] In one possible implementation, the response module is further configured to respond to a data source addition request initiated by the generating user on the data source processing interface by displaying the data source addition interface to the generating user; the data source addition interface includes data source addition fields; the data source addition fields include a data source identifier field to be added and a data source path information field to be added;
[0044] The response module is also used to respond to the user's input of the data source identifier and data source path information when adding fields to the data source in the data source addition interface, and to add the data source corresponding to the data source identifier based on the data source path information.
[0045] In one possible implementation, the device further includes: an open module;
[0046] The response module is also used to respond to the account and password information entered by the user on the login interface, and to verify the identity of the user based on the account and password information;
[0047] The open module is used to configure the reports within the user's permissions into the corresponding report processing interface after successful authentication, and to grant the user the processing permissions for each report; the processing permissions include report modification permissions; the report modification permissions are used to limit whether the user can initiate report generation requests for the reports.
[0048] In one possible implementation, after successful authentication, the open module is also used to configure the dataset added by the generating user into the corresponding dataset processing interface, thereby granting the generating user the processing permissions corresponding to each dataset.
[0049] The open module is also used to configure the user-generated data sources into the corresponding data source processing interface, and to grant the user the processing permissions corresponding to each data source.
[0050] In one possible implementation, the device further includes: a display module;
[0051] The response module is also used to respond to the target style component selected by the generating user in the style component of the report generation area, and to display the component configuration field corresponding to the target style component in the parameter configuration area, so that the generating user configures the style display parameters of the target style component based on the displayed component configuration field;
[0052] The style component is used to decorate the report generation area;
[0053] The display module is used to display the target style component in the report generation area based on the style display parameters.
[0054] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of any of the report generation methods in the first aspect.
[0055] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when run by a processor, performs the steps of any of the report generation methods in the first aspect.
[0056] This application provides a report generation method, apparatus, electronic device, and storage medium. The method includes: responding to a report generation request initiated by a user in a report processing interface, displaying a report generation interface corresponding to the report generation request to the user; the report generation interface includes a report generation area and a parameter configuration area; responding to a target data display component selected by the user in the data display components within the report generation area, displaying the component configuration fields corresponding to the target data display component in the parameter configuration area, so that the user configures the dataset and data display parameters for the target data display component based on the displayed component configuration fields; displaying data in the dataset in the report generation area based on the data display parameters and the target data display component; and responding to a report completion request initiated by the user in the report generation interface, generating a report from the content in the report generation area. This application can generate reports from data through data display components, improving report generation efficiency and data accuracy. Attached Figure Description
[0057] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A flowchart of a report generation method provided in an embodiment of this application is shown;
[0059] Figure 2 A flowchart illustrating the generation process of the dataset provided in an embodiment of this application is shown;
[0060] Figure 3 This paper shows a schematic diagram of the structure of a report generation device provided in an embodiment of this application;
[0061] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0063] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0064] To enable those skilled in the art to utilize the content of this application, and in conjunction with the specific application scenario of "report processing," the following implementation methods are provided. For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is primarily described within the "report processing field," it should be understood that this is merely an exemplary embodiment.
[0065] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0066] The following is a detailed description of a report generation method provided in an embodiment of this application.
[0067] Reference Figure 1 The diagram shown is a flowchart illustrating a report generation method provided in an embodiment of this application. The exemplary steps of this embodiment are described below:
[0068] S101. In response to the report generation request initiated by the user in the report processing interface, the report generation interface corresponding to the report generation request is displayed to the user; the report generation interface includes a report generation area and a parameter configuration area.
[0069] In this embodiment, the report processing interface includes multiple reports and a report creation button. Each user has specific processing permissions for each report (report modification, deletion, viewing, and export permissions, etc.). Each processing permission for each report has a corresponding processing button in the report processing interface. Users can perform corresponding report processing through the buttons corresponding to each processing permission for each report. Users initiate a report generation request by clicking the report creation button or the processing button corresponding to the report modification permission.
[0070] Specifically, if a report generation request is initiated by clicking the "New Report" button, the content of the report generation area in the corresponding report generation interface will be empty. If a report generation request is initiated by clicking the "Process" button corresponding to the report modification permission, the content of the report generation area will be the content of the last generated report corresponding to that button.
[0071] Here, the content in the report generation area is the content in the final generated report. The parameter configuration area is used to configure the component configuration fields corresponding to each component in the report generation area. Components include data display components, style components, and text components, etc. Different components have different functions and correspond to different component configuration fields.
[0072] Furthermore, data display components are used to display data in various forms; (various map-related components, form-related components, carousel-related components, table-related components, planar bar chart-related components, planar line chart-related components, planar pie chart-related components, tab switching components, 3D bar chart-related components, 3D line chart-related components, 3D pie chart-related components, etc., and other various other types of components can also be added according to the actual situation).
[0073] The component configuration fields for the planar bar chart component include the x-axis field (representing the category of each bar) and the bar data (representing the amount of data in the category represented by the bar); the component configuration fields for the 3D bar chart component include the x-axis field and the bar data; the component configuration fields for the map component include name and value; the component configuration fields for the table component include the table header field; the component configuration fields for the carousel component include the image annotation img_desc and the image URL imageUrl; the component configuration fields for the 3D line chart component include the x-axis field, the bar data, and the line data; the component configuration fields for the form dropdown component include the label dropdown name and the value dropdown value; and the component configuration fields for the tab toggle component include the tab background image imgurl, the tab name imgurl, and the child tab data imgurl.
[0074] Furthermore, style components are used to decorate the report generation area (such as border components, line components, etc.).
[0075] Furthermore, the text component is used to add static text content to the report generation area.
[0076] S102. In response to the target data display component selected by the generating user in the data display component of the report generation area, the component configuration fields corresponding to the target data display component are displayed in the parameter configuration area, so that the generating user configures the dataset and data display parameters for the target data display component based on the displayed component configuration fields.
[0077] In this embodiment, the report generation interface also includes a component configuration area, which includes various components, such as a data display component. If the report generation request is initiated by clicking the "New Report" button, the data display component in the report generation area is dragged in by the user from the component configuration area. If the report generation request is initiated by clicking the "Process" button corresponding to the report modification permission, the data display component in the report generation area can be dragged in by the user from the component configuration area, or it can be the data display component of the report corresponding to the "Process" button in the last generated report generation area.
[0078] The dataset refers to the collection of data that needs to be displayed through the target data display component. The data display parameters are used to configure the appearance of the target data display component when displaying the data in the dataset, such as font color and the position of each data in the dataset.
[0079] Further, drag and drop the data display component from the component configuration area to the report generation area using the following steps:
[0080] Step 1: In response to the generation of the drag-and-drop data display component selected by the user in the component configuration area, record the starting drag position and drag offset of the drag-and-drop data display component.
[0081] In this embodiment, the data display component within the component configuration area is a draggable component, which can be a visual element such as an icon, text box, or image. Dragging functionality is added to the draggable component using JavaScript and DOM events. Dragging is implemented by listening to mouse events. The user selects a data display component within the component configuration area by pressing the left mouse button; the selected data display component is the draggable data display component. In response to the user selecting the draggable data display component within the component configuration area, the mouse offset at the time the user triggers a drag-stop event is determined as the drag offset. The drag-stop event can be releasing the left mouse button.
[0082] Step 2: Calculate the target drag position corresponding to the drag data display component based on the starting drag position and drag offset.
[0083] Step 3: If the target drag position is within the report generation area, then display the data display component at the target drag position.
[0084] S103. In the report generation area, display the data in the dataset based on the data display parameters and the target data display component.
[0085] Optionally, in response to the target style component selected by the user in the style components of the report generation area, the component configuration field corresponding to the target style component is displayed in the parameter configuration area, so that the user configures the style display parameters of the target style component based on the displayed component configuration field.
[0086] In this embodiment, the component configuration area also includes style components. If the report generation request is initiated by clicking the "New Report" button, the style components in the report generation area are those dragged in by the user from the component configuration area. If the report generation request is initiated by clicking the "Process" button corresponding to the report modification permission, the style components in the report generation area can be those dragged in by the user from the component configuration area, or they can be the style components of the report corresponding to that "Process" button in the last generated report generation area.
[0087] The style display parameters are used to configure the appearance of the target style component in the report generation area, such as component color and component position.
[0088] Here, the drag-and-drop operation for style components is the same as that for data display components.
[0089] Optionally, in response to the target text component selected by the generating user in the text component of the report generation area, the component configuration field corresponding to the target text component is displayed in the parameter configuration area, so that the generating user configures the display text and text display parameters of the target text component based on the displayed component configuration field.
[0090] In this embodiment, the component configuration area also includes a text component. If the report generation request is initiated by clicking the "New Report" button, the text component in the report generation area is dragged in by the user from the component configuration area. If the report generation request is initiated by clicking the "Process" button corresponding to the report modification permission, the text component in the report generation area can be dragged in by the user from the component configuration area, or it can be the text component of the report corresponding to the "Process" button in the last generated report generation area.
[0091] Among them, the displayed text refers to the text displayed in the target text component; the text display parameters are used to configure the appearance of the target text component in the report generation area, such as component color, component position, etc.
[0092] Here, the drag-and-drop operation for the text component is the same as that for the data display component.
[0093] Furthermore, the dataset is generated in advance; refer to Figure 2 The following is a flowchart illustrating the generation process of the dataset provided in an embodiment of this application:
[0094] S201. In response to the dataset generation request initiated by the user in the dataset processing interface, the dataset generation interface is displayed to the user. The dataset generation interface includes dataset generation fields. The dataset generation fields include a data source identifier field, a dataset identifier field to be generated field, a dataset query statement field, and query parameter fields corresponding to the dataset query statement field.
[0095] In this embodiment of the application, the dataset processing interface is provided with a dataset generation button; the user initiates a dataset generation request by clicking the dataset generation button.
[0096] S202. In response to the user's input of the data source identifier, the dataset identifier to be generated, the dataset query statement, and the query parameters corresponding to the dataset query statement in the dataset generation interface for the dataset generation field, perform a data query in the data source corresponding to the data source identifier based on the dataset query statement and the corresponding query parameters to obtain the dataset corresponding to the dataset identifier to be generated.
[0097] In this embodiment, the data in the data source corresponding to the data source identifier is cleaned and de-identified to obtain the target data; the target data is queried according to the dataset query statement and the corresponding query parameters to obtain the dataset corresponding to the dataset identifier to be generated.
[0098] Here, cleaning refers to removing null values from the data, while desensitization refers to removing or masking sensitive data such as ID card numbers, mobile phone numbers, names, and email addresses.
[0099] Among them, the dataset query statement is used to characterize the query logic of the data in the dataset corresponding to the dataset identifier to be generated, and the query parameters are used to characterize the query conditions of the data in the dataset corresponding to the dataset identifier to be generated.
[0100] In addition, the dataset processing interface also includes pre-generated datasets that match the processing permissions of the generating user. These pre-generated datasets can be generated by the generating user or by other generating users. Each generating user has their own dataset processing permissions (dataset modification permissions, dataset viewing permissions, dataset deletion permissions, etc.) for each dataset in the dataset processing interface. Each dataset's processing permission is associated with a dataset processing button; generating users can use the buttons corresponding to each dataset's processing permission to perform the appropriate dataset processing.
[0101] Specifically, in response to the user clicking the dataset processing button corresponding to the dataset modification permission in the dataset processing interface, the query parameter field corresponding to the dataset query statement field is displayed in the dataset modification interface; in response to the user inputting the query parameter field corresponding to the dataset query statement, the data query is performed based on the latest input query parameter corresponding to the dataset query statement, the data source identifier, the dataset identifier to be generated, and the dataset query statement configured for the dataset corresponding to the dataset processing button, to obtain the dataset corresponding to the dataset identifier to be generated.
[0102] Furthermore, the data source is added in advance, specifically including: in response to a data source addition request initiated by the user in the data source processing interface, displaying the data source addition interface to the user; the data source addition interface includes data source addition fields; the data source addition fields include a data source identifier field and a data source path information field. In response to the user's input of the data source identifier and data source path information in the data source addition interface, the data source corresponding to the data source identifier is added according to the data source path information.
[0103] In this embodiment, the data source processing interface is provided with a data source add button; users can initiate a data source add request by clicking the data source add button.
[0104] In addition, the data source processing interface also includes added data sources that match the data source processing permissions of the generated user. Each generated user has specific data source processing permissions for each data source in the interface (data source modification permissions, data source viewing permissions, data source deletion permissions, etc.). Each data source's processing permission is accompanied by a corresponding data source processing button; the generated user can use these buttons to perform the appropriate data source processing.
[0105] The added data source can be added by the generating user or by other generating users.
[0106] S104. In response to the report completion request initiated by the user in the report generation interface, generate a report from the content in the report generation area.
[0107] Furthermore, users need to log in before processing reports, data sources, and datasets; specifically:
[0108] In response to the account and password information entered by the generated user on the login interface, the generated user is authenticated based on the account and password information;
[0109] After successful authentication, the reports within the user's permissions will be configured in the corresponding report processing interface, and the user will be granted processing permissions for each report. These permissions include report modification permissions, which limit whether the user can initiate report generation requests. The datasets added by the user will be configured in the corresponding dataset processing interface, granting the user processing permissions for each dataset. The data sources generated by the user will also be configured in the corresponding data source processing interface, granting the user processing permissions for each data source.
[0110] Furthermore, the specific implementation principle of the report generation method provided in this application embodiment is based on the Vue framework, independently developed and encapsulated into a Vue component package. Specifically: Adaptive layout components are designed using the adaptive report front-end framework Vue.js. The report layout is designed, defining the overall layout of the report, ensuring it adapts to different screen sizes. Responsive style design: CSS media queries and responsive layout technology are used to define corresponding style rules for different screen sizes and device types; this ensures the report automatically adapts and presents the best display effect on different devices. Data acquisition and binding: The required data for the report is obtained from the backend and bound to the corresponding components. Data can be obtained through RESTful APIs, and the front-end state management library (Vuex) is used for data management and binding. Dynamic chart size adjustment: The event handling and DOM manipulation functions provided by the front-end framework are used to listen for changes in window size and adjust the size of the report components accordingly, ensuring the chart automatically adapts and maintains a suitable proportion under different window sizes. Responsive interaction: Responsive interactive functions are added to the components, allowing users to interact with the report and perform data filtering, sorting, or other operations; this can be achieved using the interactive features provided by the front-end chart library.
[0111] Based on the same inventive concept, this application also provides a report generation device corresponding to the report generation method. Since the principle of the device in this application is similar to the above-mentioned report generation method in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0112] Reference Figure 3 The diagram shown is a schematic of a report generation device provided in an embodiment of this application. The report generation device includes:
[0113] The response module 301 is used to respond to a report generation request initiated by the generating user in the report processing interface, and to display the report generation interface corresponding to the report generation request to the generating user; the report generation interface includes a report generation area and a parameter configuration area;
[0114] The response module 301 is also used to respond to the target data display component selected by the generating user in the data display component of the report generation area, and to display the component configuration field corresponding to the target data display component in the parameter configuration area, so that the generating user configures the dataset and data display parameters for the target data display component based on the displayed component configuration field;
[0115] Display module 302 is used to display data in the dataset in the report generation area based on the data display parameters and the target data display component;
[0116] The response module 301 is also used to respond to the report completion request initiated by the user in the report generation interface and generate a report from the content in the report generation area.
[0117] In one possible implementation, the report generation interface further includes a component configuration area, which includes a data display component; the device also includes: a calculation module 303 and a display module 304.
[0118] The response module 301 is used to respond to the generation of the drag-and-drop data display component selected by the user in the data display component in the component configuration area, and to record the starting drag position and drag offset of the drag-and-drop data display component.
[0119] The calculation module 303 is used to calculate the target drag position corresponding to the drag data display component based on the starting drag position and the drag offset.
[0120] Display module 304 is used to display the dragged data display component at the target drag position if the target drag position is within the report generation area.
[0121] In one possible implementation, the response module 301 is further configured to respond to a dataset generation request initiated by the generating user in the dataset processing interface by displaying the dataset generation interface to the generating user; the dataset generation interface includes dataset generation fields; the dataset generation fields include a data source identifier field, a dataset identifier field to be generated, a dataset query statement field, and query parameter fields corresponding to the dataset query statement field.
[0122] The response module 301 is also used to respond to the data source identifier, the dataset identifier to be generated, the dataset query statement and the query parameters corresponding to the dataset query statement input by the user in the dataset generation interface for the dataset generation field, and to perform data query in the data source corresponding to the data source identifier according to the dataset query statement and the corresponding query parameters to obtain the dataset corresponding to the dataset identifier to be generated.
[0123] The dataset query statement is used to characterize the query logic of the data in the dataset corresponding to the dataset identifier to be generated, and the query parameters are used to characterize the query conditions of the data in the dataset corresponding to the dataset identifier to be generated.
[0124] In one possible implementation, the response module 301 is further configured to respond to a data source addition request initiated by the generating user in the data source processing interface by displaying the data source addition interface to the generating user; the data source addition interface includes data source addition fields; the data source addition fields include a data source identifier field to be added and a data source path information field to be added;
[0125] The response module 301 is also used to respond to the user's input of the data source identifier and data source path information in the data source addition interface for adding fields to the data source, and to add the data source corresponding to the data source identifier according to the data source path information.
[0126] In one possible implementation, the device further includes: an open module 305;
[0127] The response module 301 is also used to respond to the account and password information entered by the user on the login interface, and to verify the identity of the user based on the account and password information;
[0128] The open module 305 is used to configure the reports within the user's permissions to the corresponding report processing interface after successful authentication, and to grant the user the processing permissions for each report. The processing permissions include report modification permissions. The report modification permissions are used to limit whether the user can initiate report generation requests for the reports.
[0129] In one possible implementation, after successful authentication, the open module 305 is further configured to configure the dataset added by the generating user into the corresponding dataset processing interface, thereby granting the generating user the processing permissions corresponding to each dataset.
[0130] The open module 305 is also used to configure the data source generated by the user to the corresponding data source processing interface, and to open the processing permissions corresponding to each data source for the user.
[0131] In one possible implementation, the device further includes: a display module 306;
[0132] The response module 301 is also used to respond to the target style component selected by the generating user in the style component of the report generation area, and to display the component configuration field corresponding to the target style component in the parameter configuration area, so that the generating user configures the style display parameters of the target style component based on the displayed component configuration field;
[0133] The style component is used to decorate the report generation area;
[0134] The display module 306 is used to display the target style component in the report generation area based on the style display parameters.
[0135] This application provides a report generation device, comprising: a response module, configured to respond to a report generation request initiated by a user in a report processing interface, and display the report generation interface corresponding to the report generation request to the user; the report generation interface includes a report generation area and a parameter configuration area; a response module 301, further configured to respond to a target data display component selected by the user in the data display components within the report generation area, and display the component configuration fields corresponding to the target data display component in the parameter configuration area, so that the user configures the dataset and data display parameters for the target data display component based on the displayed component configuration fields; a display module 302, configured to display the data in the dataset in the report generation area based on the data display parameters and the target data display component; and a response module 301, further configured to respond to a report completion request initiated by the user in the report generation interface, and generate a report from the content in the report generation area. This application can generate reports from data through data display components, improving report generation efficiency and data accuracy.
[0136] like Figure 4 As shown in the embodiment of this application, an electronic device 400 includes a processor 401, a memory 402, and a bus. The memory 402 stores machine-readable instructions that can be executed by the processor 401. When the electronic device is running, the processor 401 communicates with the memory 402 through the bus, and the processor 401 executes the machine-readable instructions to perform the steps of the report generation method described above.
[0137] Specifically, the memory 402 and processor 401 mentioned above can be general-purpose memory and processor, without any specific limitations. When the processor 401 runs the computer program stored in the memory 402, it can execute the above-mentioned report generation method.
[0138] Corresponding to the above report generation method, this application embodiment also provides a computer-readable storage medium storing a computer program, which is executed by a processor to perform the steps of the above report generation method.
[0139] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0140] The modules described as separate components may or may not be physically separate. The components shown as modules 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.
[0141] In addition, 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.
[0142] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, 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 a portion 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 information processing 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, ROM, RAM, magnetic disks, or optical disks.
[0143] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A report generation method, characterized in that, The report generation method includes: In response to a report generation request initiated by a user in the report processing interface, the report generation interface corresponding to the report generation request is displayed to the user; the report generation interface includes a report generation area and a parameter configuration area. In response to the target data display component selected by the generating user in the data display component of the report generation area, the component configuration field corresponding to the target data display component is displayed in the parameter configuration area, so that the generating user configures the dataset and data display parameters for the target data display component based on the displayed component configuration field; The data in the dataset is displayed in the report generation area based on the data display parameters and the target data display component. In response to the report completion request initiated by the user in the report generation interface, the content in the report generation area is used to generate a report.
2. The report generation method according to claim 1, characterized in that, The report generation interface also includes a component configuration area, which includes a data display component; the method further includes: In response to the generation of the drag-and-drop data display component selected by the user in the component configuration area, the starting drag position and drag offset of the drag-and-drop data display component are recorded. Calculate the target drag position corresponding to the drag data display component based on the starting drag position and the drag offset; If the target drag position is within the report generation area, the drag data display component is displayed at the target drag position.
3. The report generation method according to claim 1, characterized in that, The method further includes: In response to the dataset generation request initiated by the generating user in the dataset processing interface, the dataset generation interface is displayed to the generating user; the dataset generation interface includes dataset generation fields; the dataset generation fields include a data source identifier field, a dataset identifier field to be generated field, a dataset query statement field, and query parameter fields corresponding to the dataset query statement field; In response to the data source identifier, the dataset identifier to be generated, the dataset query statement and the query parameters corresponding to the dataset query statement input by the user in the dataset generation interface for the dataset generation field, data is queried in the data source corresponding to the data source identifier according to the dataset query statement and the corresponding query parameters to obtain the dataset corresponding to the dataset identifier to be generated. The dataset query statement is used to characterize the query logic of the data in the dataset corresponding to the dataset identifier to be generated, and the query parameters are used to characterize the query conditions of the data in the dataset corresponding to the dataset identifier to be generated.
4. The report generation method according to claim 3, characterized in that, The method further includes: In response to the data source addition request initiated by the generating user in the data source processing interface, the data source addition interface is displayed to the generating user; the data source addition interface includes data source addition fields; the data source addition fields include a data source identifier field to be added and a data source path information field to be added; In response to the user's input of the data source identifier and data source path information in the data source addition interface for adding fields to the data source, the data source corresponding to the data source identifier is added according to the data source path information.
5. The report generation method according to claim 4, characterized in that, The method further includes: In response to the account and password information entered by the generated user on the login interface, the generated user is authenticated based on the account and password information; After successful authentication, the reports within the user's permissions are configured in the corresponding report processing interface, and the user is granted processing permissions for each report; the processing permissions include report modification permissions; the report modification permissions are used to limit whether the user can initiate report generation requests for the reports.
6. The report generation method according to claim 5, characterized in that, After successful authentication, the method further includes: Configure the datasets added by the generating user into the corresponding dataset processing interface, and grant the generating user the processing permissions corresponding to each dataset; The user-generated data source is configured in the corresponding data source processing interface, and the user is granted processing permissions for each data source.
7. The report generation method according to claim 1, characterized in that, The method further includes: In response to the target style component selected by the generating user in the style components of the report generation area, the component configuration field corresponding to the target style component is displayed in the parameter configuration area, so that the generating user configures style display parameters for the target style component based on the displayed component configuration field; The style component is used to decorate the report generation area; The target style component is displayed in the report generation area based on the style display parameters.
8. A report generation device, characterized in that, The report generation device includes: The response module is used to respond to a report generation request initiated by a user in the report processing interface, and to display the report generation interface corresponding to the report generation request to the user; the report generation interface includes a report generation area and a parameter configuration area. The response module is further configured to respond to the target data display component selected by the generating user in the data display component of the report generation area, and display the component configuration field corresponding to the target data display component in the parameter configuration area, so that the generating user configures the dataset and data display parameters for the target data display component based on the displayed component configuration field; The display module is used to display data in the dataset in the report generation area based on the data display parameters and the target data display component; The response module is also used to respond to the report completion request initiated by the user on the report generation interface and generate a report from the content in the report generation area.
9. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the report generation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the report generation method as described in any one of claims 1 to 7.